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

Update field on Account record when opp is saved in a certain stage

I don't need to do this as there's a workaround with Data Loader, but I'm interested in automating this if possible.


Basically, I want a field on the Account object (you could call the field "Has an opp in stage 1 2 or 3?" that is a checkbox, that is automatically updated to be true or false, depending on whether the account has any opps at the present time in stage 1 2 or 3.  Is this something I need a trigger for?


Although roll-up summary fields typically only work for master/detail relationships, you *can* create a roll-up summary on Account that summarizes data for related Opportunities. And you can use filter critera to define the conditions you're looking for. So no trigger is required.