Mail Script - how to get sys_id of current email

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2020 05:06 AM
Hi, I need to be able to get the sys_id of the email being sent out inisde the mail script.
Anyone have suggestions on how this could be done? This has to work for both email notifications and e-mail sent using Email Client.
I thought the "email" or "email_action" object would help but it seems none of those objects allow to get the sys_id of the current email.
Thanks in advance for any pointers.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2020 05:13 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2020 05:25 AM
Thank you but I'm not trying to get the Notification sys_id, I'm trying to get the actual email record sys_id.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2020 05:23 AM
Hi,
Do you mean the sys_id of the current record....that's involved in the email?
If so, you can use current.sys_id
Otherwise, if you mean the sys_id of the email, then yea, check out Jaspal's post above. Although that post is from 9 years ago, haha, it'll probably still work.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2020 05:25 AM
nope, I'm looking for the sys_email sys_id but thanks 😉