How to find Info Message?

GeoffreyOptumOp
Tera Expert

OK.  This is downright embarrassing!  But I can NOT figure out where this blue message is coming from...

find_real_file.png

What in the world am I missing?  I have tried the following:

Global Search (Hourglass at top right of any page)
Code Search (Global)
Business Rules Table
Client Scripts Table
Messages table (sys_ui_message)
Search for the sys_id of the record.
Form Design (annotations) - No such annotation is present.
Tried disabling all associated Business Rules, Client Scripts and UI Actions.

1 ACCEPTED SOLUTION

GeoffreyOptumOp
Tera Expert

OK.  Wow.  This ended up being:

1) A message defined in a custom table "u_notes", which was NOT indexed.

and

2) A client script (sys_script_client) defined against table "global", which makes an AJAX call and looks for records in that custom table, and if found, does a showFieldMsg() or addInfoMessage() operation.  It uses the current table g_form.getTableName() and current sys_id getUniqueValue() as the input parameters.

So basically the concept allows the company to attach a custom message to any record or field, with no additional code being written, and no new fields defined.

I couldn't find the message because of the indexing, and I couldn't find the client script because it was defined at a level way above the table I was working with.

@shloke04 , @Tony Chatfield , @Hitoshi Ozawa , @Allen Andreas , @Mark Roethof Thanks for your input.

View solution in original post

19 REPLIES 19

Tony Chatfield1
Kilo Patron

Hi, if it appears with no user interaction, then I would have thought onload client script....

Did you search on partial text, in case part of the message is dynamic?
Searching via Studio > Code search might track it down.

find_real_file.png

 

Hi, @Tony Chatfield ,

Yes. I launched studio.  I chose a Global application (because it makes me select an application).  Then I used "Code Search" - "Search in All Applications", and I searched for "MIM JDBC", for "This is our p", and for "JDBC integration", and I selected the "Search in all applications" checkbox...

find_real_file.png

That last search returns 1 hit, confirming that the search is working, but the hit returned is on something irrelevant.

Hitoshi Ozawa
Giga Sage
Giga Sage

Try enabling I18N debugging to find where the message is being defined.

From navigator, select "System Localization" > "Enable I18N Debugging". Refresh the page with the message. The message will be prefixed with a code showing which table the message is defined in. If there's no prefix, it probably implies the message is hardcoded in a script.

https://docs.servicenow.com/bundle/rome-platform-administration/page/administer/localization/task/t_...

After finding the key to the message, try executing the following script to find which script is using it.

var searchString = "<string to find in script>', ];";  // need to replace with string to find

var tableList = ['sys_script_client','sys_ui_policy','sys_ui_script','catalog_ui_policy','sys_widgets','sys_ui_page',
'sys_script','sys_script_include','sysevent_script_action','sysauto','sys_script_fix',
'sys_script_email','sys_installation_exit','sp_widget','sys_security_acl','sys_transform_script',
'sys_transform_entry','sys_ui_action','sys_ui_page','sys_ui_macro','sys_ws_definition','sys_script_validator'];

tableList = ['sys_script_client'];

function searchText(tableName) {
  gs.info(tableName + '*************************');
  var gr = new GlideRecord(tableName);
  gr.addQuery('IR_AND_OR_QUERY', searchString);
  gr.query();
  while (gr.next()) {
    gs.info('script table:' + tableName + ',script name:' + gr.name);
  }
}