Can I execute UI action by UI builder button and How to call an API in UI builder?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-28-2022 02:18 AM
Hello, I'm new to ServiceNow. Can I execute UI action by clicking on UI builder? and How to call an API in UI builder?
I've created a page on UI builder, on clicking of button it should call http endpoint/third party API and render into UI page. Is this works? Any tutorials or reference will be helpful.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-04-2022 01:27 AM
Hi,
you can execute UI actions of the form from UI builder. Once you have added glide form data resources to the page, you will get all the fields, ui actions, sections related to that form.
You can add an UI component called 'Action bar' and bind the UI action data which is received from the glide form data resource.
@data.<data_resource_id>.nowRecordCommonUiactionbar.actionNodes
As far as your second question, you can call table api's from client scrips via helper methods.
helpers.snHttp.
Alternately, you can also call Rest apis and execute them via client scripts.
APi calls from UI builder ( refer -> api.data.<data_resource_id>.execute(Object inputValues))
Please let me know if this helps.