Can we auto-refresh a widget in Service Portal ???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 01:14 PM
Can we turn ON Auto-Refresh for a particular widget in Service Portal to auto-refresh every second?
As an example I was looking through below code but when I tried placing it in server script portion of my widget, I get an error that "angular" is not defined.
Can anyone please assist?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 01:31 PM
Yes,
Please use below code to auto refresh widget
function($scope,spUtil) {
setTimeout(function(){
spUtil.update($scope);
}, 3000);
}
Regards,
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 01:55 PM
How can I test that its refreshing?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 02:09 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-31-2017 02:11 PM
You piece of code goes into the Server Script or Client Controller ?
Also, the widget must refresh on page -- How will be the behavior on page?