how to update "updated by" field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2017 03:38 AM
i'm creating incident record from the workflow , i want to set the "updated by" field as some default user name.when ever the incident is created the updated by field is updated as "system".

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2017 06:22 AM
You can possibly use autoSysFields function on the GlideRecord to disable the system set fields (GlideRecord - ServiceNow Wiki ). Some others seem to have had success doing what you described, but you are turning it off for all the system set fields.
IS it possible to overrule the Gliderecord sys_updated_by during updates.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2017 06:45 AM
Hi Mohana,
Use the below sample code to achieve that functinality,but you need to fill all the system fields.
var gr=new GlideRecord('incident');
gr.initialize();
gr.autoSysFields(false);
gr.sys_updated_by='testuser';
gr.insert();
Thanks