How to call a UI action from a script?

asit_vachhani
Giga Contributor

I have a script which requires to trigger specific UI action. How can I do this?

I see on the wiki page which say action name "Defines a name to use when referencing the UI action in scripts".

4 REPLIES 4

pratulagarwal
Mega Expert

The action name is user in script to identify with UI Action has been triggered.



I guess we can not invoke a UI Action from a script.



In turn you can direct write the same code in the script from where you are trying to invoke the UI Action.



Regards


Pratul Agarwal


UI action can be triggered from client script using "gsftSubmit" function. But I am not sure how I can achieve this using server script in servicenow. Unfortunately I can not just rewrite the code here to execute the same question.


If you want to execute "whatever" is in UI action using server side script - I would advice you to wrap that "whatever" in a function inside a script include. Call that function from anywhere viz UI action/serverside script.



Let me know if you want to know more details.


eashwar
Tera Contributor

Hello Sumeet,


Is there a way to call UI Action "Retrieve completed update sets" from a script ?



Thank you,


Eashwar Elumalai