- My View
i want the user in cc as the caller for incident in an inbound email action.
While receing the mail i need to trigger an incident with cc'd user as caller.
It should be email.copied...
var user = new GlideRecord('sys_user');
current.caller_id = user.getUniqueValue() ;
The user is already there in our insatnce just want to retrive user name from cc'd email and put in caller field.So for that no need to create a new user right?
if user is already there then don't need to check, you can directly use like
current.caller_id = email.copied;
PS: Your feedback (Like, Helpful or Correct) helps community
Yes. that code will work fine for your requirement.
It is checking that incoming cc present in User table and getting sys_id of that user and then setting that value in caller field.
Mark Correct /Helpful /Like based on the effect of response.