How to translate confirm message from client script?

antony4007
Tera Expert

Hi Experts,

We have a requirement to translate a confirm message from client script.

confirm("You confirm that all information being submitted is accurate. If you are unsure select Cancel to return to editing, otherwise select OK.")

I tried below way and its not working

getMessage(("update personal information message", function(msg){
confirm(msg);}

Any one come across this translation? Please suggest.

 

Thanks,

Antony

1 ACCEPTED SOLUTION

Below setup for example, results correctly in Dutch in "Hallo", instead of English "Hello".

find_real_file.png

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

LinkedIn

View solution in original post

11 REPLIES 11

Amongst others I've successfully tested with:

confirm(getMessage('Test'));

 

So drop the g_form part if you are going for a confirm.

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

LinkedIn

Hi Mark,

 

No luck with the above line also.

Thanks,

Antony

Can you share your full script and client script settings? I assume you did check that the client script is executed?

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

LinkedIn

Hi Mark, 

Below is my client script. When i click on submit first time its showing the message key only. But when i click cancel button and when i again submit the item second time then its showing the Message correctly. Do

you know what might be the cause?

find_real_file.png

The script is fine. Though... did you use the Message field? Not seeing the field on your form, guess you didn't use it.

If I use the Message field and even literally test your code: works fine.

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

LinkedIn