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
Salesforce seekarSalesforce seekar 

Trigger Requirement ,

Requirement on trigger -- my requirement is if we change the opportunity stage  to "CLosed won" , 
 based on email address present in  Contact role in  opportunity line item  we need to send an automatic reply email to that email address  .
 can any one share sample code or give us idea how to write this trigger.
Best Answer chosen by Salesforce seekar
SonamSonam (Salesforce Developers) 
What you can do is - create a field that copies the email of the primary contact of the opportunity into a opp field and then send out a workflow email alert to the email when opp is closed won.

Read through the thread to get sample code: