drjohnchun
Tera Guru

I recently helped resolve an issue with incoming email address and am curios if this is related. That post is How to Trim Parts of Varibles from Inbound Action



Going back to your question, if the above doesn't apply to you, are you obtaining username reliably and just want to convert username to the user's sys_id so you can fill in the Caller field? If so, can you try



var gr = new GlideRecord('sys_user');


gr.query('user_name', username);


if (gr.next()) {


  var caller_id = gr.sys_id.toString();


  current.caller_id = caller_id;


}



Hope this helps.



Please feel free to connect, follow, mark helpful / answer, like, endorse.


John Chun, PhD PMP see John's LinkedIn profile

visit snowaid


ServiceNow Advocate

Winner of November 2016 Members' Choice Award