How to get email record sys id in email script

ratnaSingh113
Tera Contributor

Hello experts!!

 

How to obtain the SysID for the email records that we can view in the email logs.

I've attempted email.sysId, sys email.sysId, email.getUniqueValue, etc.

Help, please, since nothing is working.

 

5 REPLIES 5

DrewW
Mega Sage
Mega Sage

Need more information on what exactly you are trying to do.  Is this for an inbound action or an email script for an outbound notification?  Or something else?

I've email notification, My requirement is to get the sysId of sys_mail.

In the email script we have below fields, How can we get triggered email(Sent email , sys_email) sys Id 

 

Not possible, the sys_email record has not been created yet as far as I am aware.  Why do you need to get the record?  What is it you are trying to do?  If I knew I maybe able to point you in a direction that will get you what you need.

I'm trying to create PDF and want to add it in email as attachment. Using below code for that.

It requires "targetTableSysId" so i want sysEmail sysId for that

//Create PDF in Attachment table
var v = new sn_pdfgeneratorutils.PDFGenerationAPI;
var result = v.convertToPDF(htmlText, targetTable, targetTableSysId, pdfName);
gs.info("PDF Result :"+JSON.stringify(result) );