Fixscript to set sys_updated_by Not Working

jlaps
Kilo Sage

We have been asked to update values on sc_req_item records that were not completed properly or are otherwise missing some fields from not being closed, or not being closed properly. As part of this, we have been asked to take the existing UPDATED BY person, and make that the COMPLETED BY as well as updating some other field values.

 

We are using the "ritm.setWorkflow(false);" option to prevent the normal rules from grabbing these as we are working on them, but I am having no luck at all in setting the completed by to the updated by... it just comes up blank. I have even added a temporary sys_user variable to try and do it that way, but no joy.

 

Is there a trick to getting the completed by set?

3 REPLIES 3

Omkar Kumbhar
Mega Sage
Mega Sage

Hello @jlaps ,

Make use of the ritm.autoSysFields(false); 

this will not update the updated by field.

Thanks,

Omkar

If I was able to help you with your case, please click the Thumb Icon and mark as Correct.

@jlaps  also you can refer the below article

https://thesnowball.co/dont-update-system-fields-with-autosysfields/

If I was able to help you with your case, please click the Thumb Icon and mark as Correct.

Prathamesh1
Giga Guru

Hi,

Use this method ritm.autoSysFields(false); 

Giving boolean value as 'false' makes sure to not update the updated_by field.

Regards.

Please mark helpful/correct if it works for you.