Tuesday 11 June 2024

Servicenow forcefully change sys_updated_by in regualr table and additional comments

 ServiceNow forcefully change sys_updated_by

https://www.servicenow.com/community/developer-forum/fixscript-to-set-sys-updated-by-not-working/m-p/2446671


gr.autoSysFields(false);



gr.sys_updated_by = 'myusername'

gr.update();

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB1113503




Servicenow change addtional comments uer

additional comment user is in sys_history_set

https://www.servicenow.com/community/sysadmin-forum/changing-the-user-name-tagged-in-the-work-notes-or-additional/m-p/2366111


https://www.servicenow.com/community/developer-forum/can-you-change-the-name-of-user-to-system-in-work-notes/m-p/2194112


https://www.servicenow.com/community/developer-forum/can-you-change-the-name-of-user-to-system-in-work-notes/m-p/2194112


var myUser = gs.getSession().impersonate("62826bf03710200044e0bfc8bcbe5df1");// sys_id of user who you want to be static or system.

// applies to all other function calls **** within a script execution


No comments:

Post a Comment