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
Vidya BaskarVidya Baskar 

Quick Action to update a Contact in the Opportunity Contact Role as Primary

I'm looking to create a quick action/Button to mark a Contact as Primary in the Opportunity Contact Role related list. 
Any ideas or recommendations please.
ShirishaShirisha (Salesforce Developers) 

Hi Vidya,

Greetings!

You can achieve this using the Process builder+flow.Please follow the steps to create the flow and process builder to make the contact as Primary on the related list of Opportunity.

https://judisohn.com/2015/04/06/using-salesforce-process-builder-flow-with-opportunity-contact-roles/

If you would like to use custom button only then you can pass the OpportunityId instead of passing the Id through the Process builder.

Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.

Warm Regards,
Shirisha Pathuri

Vidya BaskarVidya Baskar
Looks like this is pulling the Primary contact and autopopulating a look up field . 
But i'm looking to update a contact as Primary in the related list in a single click instead of Edit and check the primary checkbox and saveUser-added image
ShirishaShirisha (Salesforce Developers) 
Hi Vidya,

Oh got it,if you would like to create button which will make one of the contact as Primary then you would first need to write the condition to pick one contact role if you have more than one and update it on the code.

Thank you!

 
Vidya BaskarVidya Baskar
Could you please explain this in detail.
What are the steps from start to finish.

Thank you!