How to get the name of the sender from inbound action

shaik_irfan
Tera Guru

Hi,

When i receive the email to servicenow i want to get the name of the sender.

 

1 ACCEPTED SOLUTION

In such case, you get guest.

var name = gs.getUser().getUserByID(email.from_sys_id).getDisplayName();

if(name="guest") {

  name = email.from;

}

View solution in original post

11 REPLIES 11

@Jaspal Singh 

 

Actual plan is to create a new user record if user is not available in some circumtances.

 

So i am creating a user record from the inbound action now the issue for the new user record i am not able to define the name 

Anurag Tripathi
Mega Patron
Mega Patron

HI,

Hope this will help

Values automatically set from incoming email
Field value set Value used from incoming email
current.caller_id User ID of the first user whose email address matches the email.from variable.
current.opened_by

User ID of the first user whose email address matches the email.from variable.

-Anurag