fix script only updating 20 records per execution

omsa1
Kilo Guru

We have 2 business service field in incident table, one is out of box and another field is from task table . both referenced to CMDB_CI table. I'm trying to copy u_business_service to business_service using fix script as below. its just updating few records for each execution. i have about 9000 records to update. initially i received data policy error and i've included "gr.setUseEngines(false);" in the script . Is there any limitation for updating records? what could be the problem? 

var gr = new GlideRecord('incident');
gr.addEncodedQuery('u_business_serviceISNOTEMPTY');
gr.addQuery();
gr.query();
while(gr.next()){

gr.business_service = gr.u_business_service;
gr.setWorkflow(false);
gr.setUseEngines(false);
gr.update();

}

1 ACCEPTED SOLUTION

omsa1
Kilo Guru

Hi All,

 

this is fixed, its due to rules set for fix script to execute any script just for few minutes to avoid system slowness while execute the scripts. 

I run fix script few times to update the records. 

 

Thanks for the suggestions. 

View solution in original post

2 REPLIES 2

Raf1
Tera Guru

You can check any existing Data Policies for mandatory field rules.

omsa1
Kilo Guru

Hi All,

 

this is fixed, its due to rules set for fix script to execute any script just for few minutes to avoid system slowness while execute the scripts. 

I run fix script few times to update the records. 

 

Thanks for the suggestions.