Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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