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
Ananthanarayanan NemmaraAnanthanarayanan Nemmara 

Update main contact checkbox in contact object

Hi All,

I have a checkbox called "main contact" in my contact object which when checked I populate the "primary contact" field in accounts object based ob a process vis process builder. This is working fine. But now if I have another new contact for the same account which is now the primary one, how do I uncheck the main contact checkbox for the old contact?

Abdul KhatriAbdul Khatri
Since you are already updating the "primary contact" field in accounts via process builder. I don't think you can do mass updates from there. For that you need create a flow and call it from the Process builder after you current process of update the primary contact on account is done. The flow will be resposible to select all contact for the current contact account except the running and update the flag over all those contacts.

User-added image

I hope this helps.
Abdul KhatriAbdul Khatri
Was this helpful?
Ananthanarayanan NemmaraAnanthanarayanan Nemmara
Thanks for your reply Abdul but the solution which I followed was different. Please check the link: