- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 04:06 AM
Hello Everyone,
I have added a new section(tab) in Incident form. This section has a ui macro which loads more information by making REST api calls on load event(ui macro onload javascript).
The sections are loaded as soon as the incident form is loaded.
My requirement is, I want to call these APIs only when user clicks on this section.
So is there any script which I can run when the tab becomes active?
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 06:05 AM
Pleasure!
We had similar requirement long back and convinced customer to go with simpler alternative 🙂
You can mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 06:05 AM
Pleasure!
We had similar requirement long back and convinced customer to go with simpler alternative 🙂
You can mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Best Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 04:53 AM
Using DOM it might be possible but it's not recommended.
You can have some checkbox within the UI macro and based on that when it's checked the API calls will run and show the data.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-22-2022 09:04 PM
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader