Call Script include from modules (script from argument) link type
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2023 12:37 AM
Hello experts,
I have a requirement where when a user clicks on a module, a confirmation pop-up should appear with two options: "Yes" and "No." If the user clicks on "Yes," it should delete incidents whose state is closed. I have written a script include for GlideModel, and I am calling that script include through the module's script using argument link type. It's calling the script include correctly, but the confirmation box is not appearing. Can anyone please guide me on this?
Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2023 02:53 AM
GlideModal will work on client side and won't work in script include which is a server side code.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2023 03:06 AM
Hey @Mark Wood :
You can achieve the requirement via calling a UI page from the module
UI page will have the pop-up UI and you can have the processing script or client script to do the closure functionality
Mark this as Helpful / Accept the Solution if this clears your issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2023 04:04 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-12-2023 06:09 AM
Hey @Mark Wood :
Follow the below steps to call a UI page from the module
- Step 1: Create a UI page (note I have used an existing OOB one)
- If it is global use the name to call the UI page
- If it is in custom scope use the endpoint to call the UI page
- Step 2:
- Create your module and set it to URL (from Arguments) type
- Call the UI page using the name or endpoint
Outcome:
Mark this as Helpful / Accept the Solution if this clears your issue