BR runs for some admin users and not for others !

ITA
Tera Contributor

Hi ,

I have a before Business Rule on the table 'problem' with error msg displayed that prevents the change of state from 'open' to 'resolved' or 'closed' if the problem still have open tasks . There are no conditions based on the role or user in the BR. The issue is that in list view ,when I run my tests, the BR works as expected on form and list  and does not allow the closure of a problem with open tasks but when the client tests it, he's able to close the problem in list view mode. We both have an admin role. I want to know if there are cases that override the BR, such as role-specific or other scenarios, that give him the possibility to change on list view and not execut the BR?

Thank you

3 REPLIES 3

Anil Lande
Kilo Patron

Can you please share your BR configuration?

Also have you tried impersonating another user and tested same scenario?

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

ITA
Tera Contributor

Hi @Anil Lande ,

Itried to impersonate with many users , aNd it works but ,only one "admin" user can edit from the list view . It's a simple BR before update on problem table, with 2 filter conditions (state is resolved OR state is closed) with the following code :

 

(function executeRule(current, previous /*null when async*/) {
var gr = new GlideRecord('problem_task');
	gr.addActiveQuery();
	gr.addQuery('problem',current.sys_id);
	gr.query();
	if (gr.next()) {
		gs.addErrorMessage(gs.getMessage('Check_Prbtask_Resoled'));
		current.setAbortAction(true);	
	}
})(current, previous);

 

 I dont know if he has a role that override the BR , is that even possible? because we have both admin role but the BR  works for me and not for him ?

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @ITA 

 

Check thsi

 

https://www.servicenow.com/community/sysadmin-forum/make-business-rule-to-run-as-system/m-p/2589912

 

https://www.servicenow.com/community/developer-forum/running-a-business-rule-as-a-specific-user/m-p/...

 

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************