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.

Business Rule should run only when the user is logged in

Sonu Parab
Mega Sage
Hello All, I have created one br that consist of some script. But I want to run this br when user is logged in. Any help appreciated. Thank you
6 REPLIES 6

shyamkumar VK
Kilo Patron

Hello @Sonu Parab ,

Try to put this following in the condition

 

gs.getSession().isLoggedIn();

 

Regards,

Shyamkumar

 

Please mark this as helpful and accept as a solution if this resolves your Ask.
Regards,

Shyamkumar

Mohith Devatte
Tera Sage
Tera Sage

@Sonu Parab You can try this method 

gs.isLoggedIn();

//it will return true or false based on the logged in state of the user

 

Hope this helps 

Mark the answer correct if this helps you 

Thanks