The CreatorCon Call for Content is officially open! Get started here.

Call Script include from modules (script from argument) link type

Mark Wood
Tera Contributor

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.

5 REPLIES 5

Ankur Bawiskar
Tera Patron
Tera Patron

@Mark Wood 

GlideModal will work on client side and won't work in script include which is a server side code.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

S Goutham
Tera Guru

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

 

 

I hope this solves your issue
Mark this as Helpful / Accept the Solution if this clears your issue

Hello, @S Goutham how can I call the UI page from the module?Please guide me on this.

regards,

Mark.

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

SGoutham_1-1694523964561.png

  • Step 2:
    • Create your module and set it to URL (from Arguments) type 
    •  Call the UI page using the name or endpoint 

SGoutham_2-1694524066937.png

Outcome:

SGoutham_3-1694524132407.png

 

 

 

 

 

 

 

 

I hope this solves your issue
Mark this as Helpful / Accept the Solution if this clears your issue