Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Updated By Field should show Name instead of ID

Rakesh40
Tera Contributor

Hello Everyone,

 

I want to update the "First name Last name" in the Updated By field (sys_updated_by OOTB) instead of ID.

I tried creating a Onbefore Business rule which is not working properly.

 

(function executeRule(current, previous /* previous */ ) {
    var gr = new GlideRecord('sys_user');
    if (gr.get('user_name', current.sys_updated_by)) {
        current.sys_updated_by = gr.name;// Updated by field OOTB
    }
})(current, previous);

 

 

Thanks

1 REPLY 1

AdamSaniS
Tera Contributor

Hi, may I know if this has been solved? Need to solve the same 😄 Many thanks!