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.

reload form client script

Jayaragavan
Giga Contributor

by clicking on a button the form should be reloaded. what is the ui action for this?

1 ACCEPTED SOLUTION

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

When you right click on the header bar on an incident/change/problem/etc you see a right click context menu which has an option called "Reload form". That option comes is defined in UI Macro called "context_form_header" and to reload the form uses the following code:



<script>


  gcm.addHref("${gs.getMessage('Reload form')}", "reloadWindow(window);");


</script>



The reloadWindow function comes from bootstrap library.



Hope this helps.



Regards,
Sergiu


View solution in original post

2 REPLIES 2

sergiu_panaite
ServiceNow Employee
ServiceNow Employee

When you right click on the header bar on an incident/change/problem/etc you see a right click context menu which has an option called "Reload form". That option comes is defined in UI Macro called "context_form_header" and to reload the form uses the following code:



<script>


  gcm.addHref("${gs.getMessage('Reload form')}", "reloadWindow(window);");


</script>



The reloadWindow function comes from bootstrap library.



Hope this helps.



Regards,
Sergiu


Abdul Fathah
Mega Guru

You can check this below article from SN Guru.



Reload a Form or Related list from a Client Script - ServiceNow Guru




Thanks,


Fathah


Thanks,
Abdul Fathah
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.