Fixscript to set sys_updated_by Not Working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 05:04 AM
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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 05:06 AM
Hello @jlaps ,
Make use of the ritm.autoSysFields(false);
this will not update the updated by field.
Thanks,
Omkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 05:07 AM
@jlaps also you can refer the below article
https://thesnowball.co/dont-update-system-fields-with-autosysfields/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2023 05:33 AM
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.