Getting the sys_id of inbound email in inbound script

kchorny
Tera Guru

I need to capture the sys_id from an incoming email in a variable within an inbound action script.   I can get email.body_text, email.subject, etc. but email.sys_id comes back as 'undefined'.   email.getUniqueValue() doesn't work either (I didn't really expect it to) and I'm at a loss for what else to try.

Thanks in advance for any help.

1 ACCEPTED SOLUTION

Uncle Rob
Kilo Patron

The sys_email variable


According to docs, it appears that you might be able to do something like sys_email.sys_id.


View solution in original post

7 REPLIES 7

Uncle Rob
Kilo Patron

The sys_email variable


According to docs, it appears that you might be able to do something like sys_email.sys_id.


Ah, so simple!   Thank you!   I really did search before I asked, honest....


Confirmed that sys_email.sys_id ran inside of an inbound email action will get the sys_id of the current inbound email for use to pass to variables so that workflow can pull and reassign the attachments or other information from the email.

This worked for me too