Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Page refresh after clicking Save button

CA5
Tera Contributor

As per the requirement when I click on Save button then only it should refresh portal page/browser.

Button Configuration on Client Side controller

c.uiAction = function(action,value) {
if (c.submitted)
return;
c.data.action = action;
c.data.value = value;
c.submitted = true;
c.server.update().then(function(){
c.submitted = false;
c.data.action = undefined;
});

};

 

How will I call below function in my "Save" button Client controller side coding

function($scope,spUtil) {

setTimeout(function(){

spUtil.update($scope);

}, 3000);

}

How can use $timeout or $interval to call the function after save button is clicked.

3 REPLIES 3

Allen Andreas
Tera Patron

For UI action you could do: action.setRedirectURL(current);

For client script you could do: location.reload() Location Reload Method

Please mark reply as Helpful/Correct, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Hello Allen,

Will this {action.setRedirectURL(current)} on Service Portal?

Regards,

CA

Hello Allen,

How can i use location.reload() with timer in client controller for service portal? Could you please help on this.

Thanks,

CA