function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sundhar.mks1.3962649227519546E12sundhar.mks1.3962649227519546E12 

How to send the email to primary contact of the opportunity?

Hi,

I have created email template for get the products information associate with the opportunity.it's working fine. How to send the Email primary contact of the opportunity? Kindly give any suggestion

Thanks.
KaranrajKaranraj
How you are identifying primary contact? is there any field to identify primay contact if so write a soql query to get the contact with your logic in where condition and assign the contact record id in setWhatId(ID) method in email message logic