The CreatorCon Call for Content is officially open! Get started here.

Can we auto-refresh a widget in Service Portal ???

arnabbose
Tera Expert

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?

find_real_file.png

9 REPLIES 9

sachin_namjoshi
Kilo Patron
Kilo Patron

Yes,



Please use below code to auto refresh widget




function($scope,spUtil) {


setTimeout(function(){


spUtil.update($scope);


}, 3000);


}



Regards,


Sachin


How can I test that its refreshing?


You can use widget editor widget preview window to test your widget.



Widget Editor



Regards,


Sachin


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?