Confirmation Dialog box - No alert - client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2020 05:15 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2020 02:15 AM
Did you follow all the steps such as importing the css, ui script etc
Regards
Ankur
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-26-2020 07:14 AM
Hello,
You can show the messege,just below the field.and it is alternative of javascrip ALERT
using g_form.showFieldMsg('Messege you want to show here');
for more info,please check the below URL of servicenow official docs.it may suite to your reqirmet
If you feel the above content is good,then please mark my answer as CORRECT AND HELPFUL.
Regards
Yash Agrawal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2020 07:18 AM
It has to be a dialog message only as fieldMsg is not that catchy for user to view. Dialog box will gain the user attention.
I am not sure why is it that hard to show the message in the dialog box on the portal.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2020 07:22 AM
Hello User,
So if you are trying to do the samw using javascrit alert ,then whats wrong in it.
Did you try to use confirm dialog box,
it is same as alert dialog box .but in confirm dialog box, you will get button OK and CANCEL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2020 07:29 AM