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
Lovely Lopez 2Lovely Lopez 2 

How to set the checkbox field in account to true if one of the contacts has that checkbox field set to true?

I have a checkbox field in contact and account called views and would like to set the views checkbox in account to true when the views checkbox in contact is set to true. I know how to do it from account to contact by cross object formula. The problem is to do it the opposite way, from contact to account especially if the account has many contacts. So what I'm trying to achieve is if the account has at least one contact that has that checkbox checked, then set the checkbox in the account to true. Is there any way to do this except for creating a trigger?
emmadiemmadi
you need trigger for this 
Vidhyasagaran MuralidharanVidhyasagaran Muralidharan
Check this post and change it according to your requirement
https://developer.salesforce.com/forums/ForumsMain?id=906F0000000AbL6IAK