- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2019 06:53 AM
Hi all, i am new to service now, just wanted to know what is the use of 'message' field in the Client script form. Please clarify this with a simple example if possible...
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-15-2019 09:40 AM
The messages can be anywhere used where messages are applicable. The example is an error message, you could also use this on the info message, alert, etc..
You will find the Messages if you navigate to "System UI > Messages".
Below the message from the above example:
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
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
06-15-2019 06:58 AM
Hi there,
You can use this field for Internationalization or to not hardcode messages within scripting (could be used for English language as well).
Within this field, you would mention the sys_ui_message record (the key). In the Client Script, you could reference that message by using getMessage. Here's an example from on of our instance:
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
---
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
07-15-2021 01:22 PM
Hi,
This is really helpful. Thanks for that. But if I wanted to display the message under my field from the system UI messages what should I do? Please help...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2024 07:10 AM
You can use g_form.showFieldMsg('Field name', message);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2025 08:44 AM
Hi Mark. I'm a little confused. I like the idea of maintaining the message from the Messages field, however, in your example, when you call "getMessage('...')" it appears your entering the message text in the code anyway. Also, the field name, "Messages" (plural) implies there could be more then one. Is it possible to add more than one message to the Messages field and refer to the specific message you want to use in the code?