How to call the UI Macro on a Server Side Script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2020 04:05 AM
Hi All,
Need your help on how to call the UI Macro in Server Side Scripting?
- Thank you.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2020 04:11 AM
Hi Sai,
Please refer below thread to know about use UI Macro in server side script.
call ui macro from business rule or script include or scheduled job
Regards,
Harshal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2020 04:33 AM
Hi Sai,
Can you share what requirement you are having which leads you to call UI macro from server side script?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2020 04:52 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-12-2020 05:05 AM
Hi Sai Venkatesh Suryadevara
To call UI Macro from Server Side we can use "GlideJellyRunner()" api.
example : UI Macro calling from Business Rule
(function executeRule(current, previous /*null when async*/) {
var runner = new GlideJellyRunner();
var result = runner.runMacro('your_ui_macro_name');
gs.addInfoMessage(result);
})(current, previous);
Mark it correct/helpful if it helps you
Regards,
Vaibhav Chaudhari