How to set dynamic reply from email address when replying to email from the ticket

ShubhamK2600572
Tera Contributor

I have a requirement when incident application is x then when anyone reply to an email from the ticket should send from email address y but else it should send from SMTP email address. For this I have created a reply sent email client template and i have written the script but it is sending all email from y email address not for if incident application is x.

1 ACCEPTED SOLUTION

@ShubhamK2600572 

did you add log and see what came in app variable?

💡 If my response helped, please mark it as correct and close the thread 🔒— this helps future readers find the solution faster! 🙏

Regards,
Ankur
Certified Technical Architect  ||  10x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

5 REPLIES 5

I got it the targetrecord variable stores the Gliderecord of the table that is selected in the table field. In this case the targetrecord is sys_email record that is sent from the incident. So I have modified the script to as 

targetRecord.instance.u_application  to get the application value. Thanks for the help.