- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2019 06:31 PM
I would like to edit this alert message:
But I simply cannot find out where this message is generated from.
I have looked everywhere from UI Actions, UI Policies, The Widget Itself, Script Includes, System UI --> Messages, Business Rules and so forth,
The form i have tested is the OOB Incident form found at https://<YOUR-INSTANCE-NAME>.service-now.com/sp?id=form&table=incident
So my question is how this is generated and how i can edit it?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2019 10:02 PM
It would appear they have hard-coded it into an embedded HTML script that loads with all portals. Look at this screenshot, taken from the source of this very page, which is itself a ServiceNow portal:
So yeah, maybe you could try overriding g_mandatory_field_msg in a custom portal widget?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2019 10:02 PM
It would appear they have hard-coded it into an embedded HTML script that loads with all portals. Look at this screenshot, taken from the source of this very page, which is itself a ServiceNow portal:
So yeah, maybe you could try overriding g_mandatory_field_msg in a custom portal widget?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2019 09:27 AM
Hello Chris,
I am also trying to find where this message is located to change it. I looked over my widget sc_catalog_item, and could not find it. Also looked over the UI Scripts and the js_include_sp file without been able to find it. Here is a screenshot of the web console which shows the message. Will greatly appreciate any guidance on how to update it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-01-2019 02:35 PM
Hi,
In a portal widget, override the value of this variable in the client script. See Christian Graabaek's solution in this thread.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2019 05:26 PM
Thank you Chris, that did the trick!
I created a Message in System Localization and got it in the Server Script:
var m = data.msgs = {};
m.mandatoryMsg = gs.getMessage("Some fields are incomplete");
And the overwriting the message in the Client Script:
$scope.m = $scope.data.msgs;
g_mandatory_field_msg = $scope.m.mandatoryMsg;