- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2020 12:42 PM
Hello,
I have an onSubmit Catalog client script and within I'm using an alert and the getMessage to automatically get a message key for translation purpose. The script has to work on all interfaces (UI type = ALL).
On the Service Portal the problem I have is that the first time the alert pops, the message key and not the actual message. On the second attempt, then the actual message is displayed.
I found some posts regarding this problem but it was for Helsinki and we are on New York.
Here is the code portion I'm using to get the message
var passed = forceMandatoryCheckboxes(mandatoryVars, mandatoryCount);
if(!passed){
//Abort the submit
alert(getMessage('select_location_access_card'));
return false;
Is this still a bug or maybe I'm not using the correct code for the Portal?
Thank you
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2020 12:45 PM
I've also described this a few months ago in this article:
Catalog Client Script Messages (Internationalization/Multi-Language)
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2020 08:12 AM
Hello,
I flushed the instance cache and it worked.
I changed my message key and I was finding weird the alert was still displaying the old key.
Thank you for your help.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-17-2020 12:45 PM
I've also described this a few months ago in this article:
Catalog Client Script Messages (Internationalization/Multi-Language)
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field