setWorkflow(false) and autoSysFields(false); is not working in fix script

Ashok60
Tera Contributor

When I try to use setWorkflow(false) and autoSysFields(false) in Fix Script/Background Script, it doesn't block to update System fields(Updated, updated by, etc.,) instead it updates the current time and currently logged-in user details. following is the script we used in the fix script/background script.

 

var gr = new GlideRecord("dmn_demand");
   gr.query();
    while (gr.next()) {
      gr.setValue('demand_manager',gr.getValue('assigned_to') );
      gr.setWorkflow(false);
      gr.autoSysFields(false);
      gr.update();
    }

1 REPLY 1

SurajInHCL
Tera Contributor

The script seems fine.
Can you share more details / example screenshot?