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
ryenduriryenduri 

Primary contact association on Account and Opportunity

Can someone help me for this below scenario?
1. Track a Primary Contact on the Account object.
2. Track a Primary Contact on the Opportunity object
      a. This contact should default to the Primary Contact on the Account.
      b. This contact can also be over written manually by user.
ShirishaShirisha (Salesforce Developers) 
Hi,

Greetings!

I would suggest you to refer the apex code in the below thread for the sample code to track the Primary Contact.

https://salesforce.stackexchange.com/questions/143447/apex-trigger-on-opportunity-contact-role-to-assign-primary-to-first-contact-on-l

Kindly mark it as best answer if it helps so that it can help others in the future.

Warm Regards,
Shirisha Pathuri