Call Email client from UI Action

ShaidaC
Tera Guru

Hi,
I have a requirement where I want to call an email client template through a UI Action. I have 2 email client templates on the same table. What I want to do is call one template from the OOB Functionality and the other using a UI Action.
Now the issue is that even after putting the correct sys id in UI Action email popup the button click still opens the older template. Can anyone please help me understand why is this happening
Below is my UI Action and email clinet template configuration

ShaidaC_0-1765537839211.png


ShaidaC_1-1765537861310.png

 

1 ACCEPTED SOLUTION

@ShaidaC 

I believe the script shared by @lauri457 won't help here as your question is different.

As per my earlier response it always picks the 1st created email client template

Did you verify that?

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

View solution in original post

8 REPLIES 8

Ankur Bawiskar
Tera Patron

@ShaidaC 

I tried and it didn't work

even if you use that method it will pick only 1 email client template which is first email client template created for that table

Seems it's limitation.

💡 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  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@ShaidaC 

Hope you are doing good.

Did my reply answer your question?

💡 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  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

lauri457
Giga Sage

I don't think you can use a template like this. Played around with the parameters and what you can do is set replytype with the third param and sysid of a sys_email record in the fourth one make the email a reply to existing email, copying recipients and the email chain.

 

emailClientOpenPop("incident", 		   //table
	null,					   		   //not used
	"reply",				   		       //reply type
	"4ca22c0283393210557ff0d6feaad37a",//sysid of sys_email record
	null,							   //not used
	false,							   //use next exp email client
	""								   //record sysid
);

 

Hi @lauri457 ,
Where can I find original documentation for this. Couldn't find the proper syntax