- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2016 06:52 AM
Hi all
Is it possible from a UI Macro to call a Ui Action ?
There is some code on the instance here which does a few bits and loads from a UI Page and works well
However, I may want to call this routine from elsewhere (on the CMS) and that it is all Ui Macro driven
My initial attempts are not working and I am not sure if it is possible, a code issue or the click not being registered
Cheers
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2016 10:10 AM
An interesting one to try out.
I created a UI action on incident table and then invoke it through UI Macro by bringing it in the Incident form as UI formatter.
UI Action:
UI Macro:
UI Formatter:
Now as a result of it, When I open any incident form it opens "www.servicenow.com" on a new page. Basically UI Macro is calling a UI action.
Hope this help!
-Manjul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2016 10:10 AM
An interesting one to try out.
I created a UI action on incident table and then invoke it through UI Macro by bringing it in the Incident form as UI formatter.
UI Action:
UI Macro:
UI Formatter:
Now as a result of it, When I open any incident form it opens "www.servicenow.com" on a new page. Basically UI Macro is calling a UI action.
Hope this help!
-Manjul

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-05-2016 01:05 PM
This will surely work, but it will violate technical best practice as it uses document.getElementById.
If the code in the UI Action is pure server side you could to a gsftSubmit with the action name as parameter. Unfortunately there is not a lot of documentation around this method though.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-06-2016 02:02 AM
Doh!
I wrote this in a hurry yesterday before my household got busy for a birthday party and when I looked at my emails later and saw the reply, I realised I had posted the wrong quetion !
However, your answer is correct for calling a UI action
I need to call a UI Script - so a new question about to be posted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-18-2018 04:42 PM