Fix Script - Set Value of Field

ErinF
Tera Expert

Hello! 

We have a need to update some closed HR Cases with a new close code. 

I have written a fix script to update the close code, but its unable to execute due to a data policy. 

Is there a method to set data policy to false? I read that setUseEngines cannot be used in a scoped app. 

Any ideas?  

var hrCase = new GlideRecord('sn_hr_core_case_relations');
hrCase.addQuery('u_close_code',"Written Warining");
hrCase.query();
	while(hrCase.next()){
	hrCase.u_close_code="Written Warning";
	hrCase.update();
}
1 ACCEPTED SOLUTION

sachin_namjoshi
Kilo Patron
Kilo Patron

You can create and execute your fix script in global scope and then use setUseEngines() method to disable data policy.

 

Regards,

Sachin

View solution in original post

5 REPLIES 5

sachin_namjoshi
Kilo Patron
Kilo Patron

You can create and execute your fix script in global scope and then use setUseEngines() method to disable data policy.

 

Regards,

Sachin