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

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


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

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