what types of scripts are written in UI action

kiran kumar m1
Tera Contributor

what types of scripts are written in UI actions ?

1.server side

2.client side

3.business rules

4.ui policy action

5.background scripts

6 REPLIES 6

Claude DAmico
Kilo Sage
  • Server - when client is unchecked
  • Client - when client is checked
  • Client & Server - when client is checked
  • Call Script Include:
    • Using GlideAjax from a Client section of the script
    • Using var si = new ScriptIncludeName() standard notation from Server section of the script

 

References for combo Client & Server:

https://docs.servicenow.com/en-US/bundle/vancouver-api-reference/page/script/useful-scripts/referenc... 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0657198 

https://servicenowguru.com/system-ui/ui-actions-system-ui/client-server-code-ui-action/ 

Claude E. D'Amico, III - CSA

S Goutham
Tera Guru

Hey @kiran kumar m1 :

 

We can run both client and Server scripts in UI action 
When the Client checkbox is clicked on UI action it runs as Client Side script
When Unchecked its server side script
We have the utility to run both client and server scripts together with the help of gsftsubmit method 
Gsftsubmit reference: https://servicenowguru.com/system-ui/ui-actions-system-ui/client-server-code-ui-action/ 

I hope this solves your issue
Mark this as Helpful / Accept the Solution if this clears your issue