customize "Update" form button

Not applicable

Hi,

How can I modify the Update form button from the default action "save record and redirect to previous screen" to "save record and redirect to Home Page"?

Thanks,
Sam

8 REPLIES 8

msrishilpa
Mega Expert

Hi Geoff,



Thanks for helping.Already I customized the update button with below script.


if(g_user.hasRole('admin'))


  action.setRedirectURL('https://demo3.service-now.com/incident_list.do?/sysparm_userpref_module=b55fbec4c0a800090088e83d7ff5...


else



action.setRedirectURL('https://demo3.service-now.com/incident_list.do?sysparm_userpref_module=087800c1c0a80164004e32c8a64a9...



But this is not working?


What behavior do you get?


Does it work if you are not logged in as an admin?


And what is this "sysparm_query=%20%20%20%20". I'm not sure what behavior that would yield.


Hi Geoff,



Its working fine for false statement.I mean Person who is not having admin role


Actually, what link are you trying to build?



I don't understand the inclusion of the sysparm_user_pref in the resulting URL.