Color for alert message
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2022 12:26 AM
Hi All,
Is there a way to show the alert message in red color using catalog client scripts.
Thanks in advance.
Regards,
Devika.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2022 12:34 AM
Hi
g_form.addErrorMessage('Your Error message will go here');
This should be enough.
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2022 01:11 AM
Hi Sandeep,
The alert should show the ok and cancel button. If we are using addErrorMessage we wont get that .
Thanks,
Devika.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2022 04:01 AM
Hi Devika,
Your original question was different.
Here you need a confirm box not alert. Create a on submit client script with your company condition and add the below sample script :
You may use the following onSubmit client script:
function onSubmit() {
//Type appropriate comment here, and begin script below
var myCompany = g_form.getValue('u_company');
confirm("Your company is" + myCompany ", do you want to continue?");
}
Mark my answer correct & Helpful, if Applicable.
Thanks,
Sandeep
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-13-2022 12:36 AM
This post on ServiceNow Guru covers off the formats and colors of generic messages
https://servicenowguru.com/scripting/ui-info-error-message-cheat-sheet/