How would i know if the message i am getting is from client script or business rule?

Community Alums
Not applicable

Hi,

How would I know if the error message I get like this is from Client Script or Business Rule? I know it for this, but how do we generally know? Kindly help.

 

error.jpg

 

Regards

Suman P.

2 ACCEPTED SOLUTIONS

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

I would use the code search for things like this. Most of the times gives good insights and within seconds.

Obviously manually searching could work also, since this example is pretty clear. Though in general, code search.

 

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

View solution in original post

Manmohan K
Tera Sage

Hi @Community Alums 

 

You can refer below video for steps on how to do code search in ServiceNow

https://www.youtube.com/watch?v=Z3et1qFGIKY

View solution in original post

Architect Mohammed Unwala gives an overview of Studio Code Search in ServiceNow. Studio allows application developers to search within application files for matching record values. You can search within application files to add, remove, or update application file values. Learn more: ...
5 REPLIES 5

Sid_Takali
Kilo Patron
Kilo Patron

Hi @Community Alums please find the message in Client Script & business Rule using condition Script Contains "It's Critical Please work on it". and check from which script it is triggering. 

Mark Roethof
Tera Patron
Tera Patron

Hi there,

 

I would use the code search for things like this. Most of the times gives good insights and within seconds.

Obviously manually searching could work also, since this example is pretty clear. Though in general, code search.

 

Kind regards,
Mark

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

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

LinkedIn

Manmohan K
Tera Sage

Hi @Community Alums 

 

You can refer below video for steps on how to do code search in ServiceNow

https://www.youtube.com/watch?v=Z3et1qFGIKY

Architect Mohammed Unwala gives an overview of Studio Code Search in ServiceNow. Studio allows application developers to search within application files for matching record values. You can search within application files to add, remove, or update application file values. Learn more: ...

Weird
Mega Sage

As everyone says the studio tool is really helpful when trying to figure out where a message is coming from. Sometimes it however isn't easy to search since the message can be build with variables, so the message in your screenshot might be "It's " + current.impact + " please work on it" which makes it hard to search on studio.

I've simply saved in my favorites BR and client script tables.
In both I've created filters that find all server side or client side messages and I simply go there and change the table accordingly.

Servicenow documentation provides some of the message functions with descriptions:
https://docs.servicenow.com/en-US/bundle/utah-api-reference/page/script/general-scripting/reference/...

Also I'm pretty sure you should be able to use g_form.addErrorMessage() and addInfoMessage() on client side as well, though I haven't used them in a while so I'm not sure if they're deprecated.