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

Mark Roethof
Tera Patron
Tera Patron

Hi there,

My search would look like:

Is it Client Side? Or is it Server Side?

This will already make your search way smaller. Depending on this, you could for example:

In the navigator enter table_name.CONFIG, and if it's client side browse through the onLoad Client Scripts for example.
Obviously it might be that the message is not literally in the script, due to messages used, or perhaps Script Includes.

It could obviously also be a simple Form annotation, so don't overlook this. It's not always scripting.

I would also immediately use the code search from SNUtils since that once takes a few seconds.

/code the string or sentence your are searching for

We also have a wider global search in our company which scans almost your entire instance, not only code. This does take several minutes though 😞

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

Thanks, @Mark Roethof 

But how would I determine if the message is coming from the Client side or the Server side?

I would expect the Global Search to find Script Includes, but just for fun, I turned off all the Script Includes that include the text "JDBC":

find_real_file.png

Then I did a Shift Refresh on the form.  And the message is still appearing.  : (

I've been stubbornly avoiding installing any kind of 3rd party add-ons to ServiceNow.  Call me a purist.  But I may have to break my policy on that soon, because this should NOT be so difficult.

A simple trick which could indicate if it's Client Side or Server Side:

When reloading the form, is the info message immediately shown or with a delay of a split second (or longer if the performance is bad).

If it's presented after a split second... you can stop searching Server Side scripting.

Kind regards,
Mark
2020, 2021 ServiceNow Community MVP
2020, 2021 ServiceNow Developer MVP

---

LinkedIn
Community article, blog, video list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

It actually takes quite a long time to warp in.  The entire form paints, and I think even the "Related Items" tab gets populated...  and only THEN does the message appear, and push everything below it farther down on the page. 

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.