"Some Fields Are Incomplete" Alert message override

Christian Graab
Giga Expert

I would like to edit this alert message: 

find_real_file.png

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? 

1 ACCEPTED SOLUTION

Chris Sanford1
Kilo Guru

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:

find_real_file.png

 

So yeah, maybe you could try overriding g_mandatory_field_msg in a custom portal widget?

View solution in original post

6 REPLIES 6

Chris Sanford1
Kilo Guru

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:

find_real_file.png

 

So yeah, maybe you could try overriding g_mandatory_field_msg in a custom portal widget?

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.

 

find_real_file.png

Hi,

In a portal widget, override the value of this variable in the client script. See Christian Graabaek's solution in this thread.

Christian Graab
Giga Expert

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;