Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to check view in business rule

ritaaudi
Tera Contributor

Hi: I have a business rule that I only want to run on a specific view. Anyone know how to do a view check in a business rule? Thanks! Rita

7 REPLIES 7

i was just searching for this answer!

thank you!

shamma
Kilo Expert

Hi Rita,



You can use the below function to get the view in business rule (Server Side)



getView() -


Returns the view used to display the list.

Jay Gamblin
Mega Sage

I found this in an OOTB BR: 

GlideTransaction.get().getRequestParameter("sysparm_view")

Can use it in the condition field if you want to only fire a BR on certain views.

Or use it in the script.