CMDB Model Updates

_bhishek
Tera Guru

Hi All,

 

I have updated CI from Old models to new models with transform map from 'on before' script.I am  importing one spreadsheet with 2 columns(Old model SysID, New Model Sys ID).It is working fine but for few CIs Model IDs are updated even Model IDs are not available in spreadsheet and For few Cis Model ID is changed to another Old model ID and then it is changed to respective  new model ID.Also 'Assigned to' field is updated for few CIs.Is there any backend operation running when we do import . 

(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
    var gr = new GlideRecord('cmdb_ci');
    gr.addQuery('model_id', source.u_old_model_sysid);
    gr.query();
    while (gr.next()) {
        if (source.u_new_model_sysid != gr.model_id) {
            gr.model_id = source.u_new_model_sysid;
            gr.update();
        } else
            ignore = true;
    }
    ignore = true;
})(source, map, log, target);
 
Thanks in advance for your inputs.
2 REPLIES 2

shikhatyagi
Kilo Sage

Hi @_bhishek 

 

Please uncheck Run business rules check box in transform map.

 

shikhatyagi_0-1710941533155.png

 

 

Please Mark this Helpful and Accepted Solution if it solves your issue.

 

Thanks & Regards,

Shikha Tyagi

Mark Manders
Mega Patron

If you have BR's running on update, that could very well be the case.


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark