Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

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.