How to Refresh the existing page from server side

sinu2
Tera Expert

HI All,

 

I have a change form . As soon as submit or update the change_request form. The form should be refresh (not redirect).So i have one business rule to update change_request . So i tried the below method to refresh but did not work.

 

gs.setRedirect('change_request.do?sys_id='+current.sys_id);

 

Any other method?

4 REPLIES 4

Ct111
Giga Sage

Hi,

 

Try the below

 

action.setRedirectURL(current);

current.update();

Mark my ANSWER as CORRECT and HELPFUL if it helps.

This you can use in UI action were server side script is used.

HI ,

SOrry i tried it did not work. Any other suggestion?

Milind Gharte
Kilo Guru

Hi sreeni,

You can use current.update();

or

if it does not resolve then here is link which has some GlideRecord methods that will help you 

 

https://developer.servicenow.com/dev.do#!/reference/api/orlando/server_legacy/c_GlideRecordAPI#r_Gli...

 

If it Helps,please mark it as Correct and Helpful.


Warm Regards,


Milind

Slava Savitsky
Giga Sage

By default, “Submit” and “Update” UI actions take the user to the previous page. Unlike them, “Save” UI action available from the form header context menu redirects to the current record. To make it more obvious for the users, you can, for example, configure that UI action to be displayed as a button rather than a context menu option and possibly also rename it to “Save and stay” or something similar.