Business rule not working after setUseEngines(false);

Dotychczas
Mega Guru

Hi Experts!

 

I'm working on fix script that will set one field on interaction record:

}else{
			grReq.setValue(field, genericUserId); 
			new global.SsgMdcGlobalApiFunctions().setUseEngines(grReq, false);
			grReq.update();

		}

as there is RO data policy I managed to update this field using setUseEngines() method that is run from global script include. Record updates fine but there is also business rule that should run on update ( rest of conditions is fullfiled) but it doesn't. I suspect that serUseEngines(false) is responsible. How can I workaround so business rule will work and I can override data policy at the same time?

1 ACCEPTED SOLUTION

Laszlo Balla
ServiceNow Employee
ServiceNow Employee

Is it a specific BR you need to run or just (update) BRs in general? If it is just one or two, perhaps you could just run he same functionality in your fix script then?

Alternatively... turn setUseEngines back on and run another update?

View solution in original post

5 REPLIES 5

Laszlo Balla
ServiceNow Employee
ServiceNow Employee

Is it a specific BR you need to run or just (update) BRs in general? If it is just one or two, perhaps you could just run he same functionality in your fix script then?

Alternatively... turn setUseEngines back on and run another update?