Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

API Call in a Custom iView Dashboard

SamSalefske
Contributor III

I've been looking at the Archer Toolbox, and am pretty impressed so far. Instead of making REST calls in a custom object (record view), I'd like to put one or two of them in a dashboard (show applications with active notifications, or those applications updated in the last X days). I've copied and pasted the custom object into a custom iView along with adding some proper html tags, but am not having any luck getting the calls to be made. 

I'm assuming you can't just make calls from the dashboards like you can within the records but thought I'd ask. Has anyone done this, and can point me in the right direction as to what I'm missing?

*I've attached my html file, but again it's really just a copy and paste of the custom object.

1 ACCEPTED SOLUTION

Accepted Solutions

SamSalefske
Contributor III

I've figured it out. This is probably a rude and crude approach, and probably not up to standards but it gives me the solution I was after ( Getting all applications with notifications enabled). put this html in a custom iView and put that on a dashboard and good to go.
If anyone has any suggestions, I'm open to hearing them.

View solution in original post

6 REPLIES 6

SamSalefske
Contributor III

I've figured it out. This is probably a rude and crude approach, and probably not up to standards but it gives me the solution I was after ( Getting all applications with notifications enabled). put this html in a custom iView and put that on a dashboard and good to go.
If anyone has any suggestions, I'm open to hearing them.

If you're logged in, you shouldn't need to create a new session.

sessionStorage["x-csrf-token"]

jsol5
Advocate II

...But maybe you're doing that because of your user's access.

Thanks for the feedback Jason. I tried using that, pulling it from rest custom object, but didn't have any luck and went with the rude and crude approach (specifying username and password). If this dashboard was going to be displayed to end users I'd be more concerned about the username and password being 'found out', but since only sysadmins will have access to this dashboard I'm okay with this approach.

Use this for your sys admins iviews, rather than user name and password

var sessionToken = parent.parent.ArcherApp.globals.workpointFeatures.SessionToken;

DataDeveloper
Contributor III

Would this still work in 6.9?
Should I replace the whole "body={}" with 

var sessionToken = parent.parent.ArcherApp.globals.workpointFeatures.SessionToken;

?