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

Confirmation Dialog box - No alert - client script

Khanna Ji
Tera Guru

Hi All,

I have a catalog client script in which I am making Ajax calls to the Script Include. That script includes checks some data in the tables and returns the output to the client script. Now in the catalog client script, I have to show that response as a message box in the Service Portal.

I am able to show it as an alert statement but it looks really dirty. How can I generate a message box and show the content in it?

I found an article but I am not sure how to use them in client script - Link Here

Thank you, appreciate your response.

20 REPLIES 20

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

Did you try that? where are you stuck?

Regards
Ankur

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

Yes, I did, its giving java script error.

Ankur Bawiskar
Tera Patron
Tera Patron

@ServiceNow User 

refer below link for help

Sweet Alert Configuration with ServiceNow

get confirmation in onSubmit client script

Regards
Ankur

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

Tried swal getting javaScript error, also tried GlideModal, getting same java script error.

Tried with exact same code with hardcoded value.