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
SteveA101SteveA101 

Rollup Summary (or something else?)

Hi All,

 

I am trying to essentially create a rollup summary on a parent lookup relationship.  I have seen lots of triggers out there that look WAY too complicated for me!  Essentially what I am trying to do is select a checkbox on the Opportunity record if there is at least ONE approved Deal (Approval Status = Approved on the custom object Deal related to Opportunity).

 

Is there an easier way to accomplish this other than a rollup trigger?  Unfortunately, I cannot switch this relationship to M/D, so I'm stuck with some sort of workaround.

 

Thanks much!!

Satish_SFDCSatish_SFDC
Roll up summaries work on objects related through M/D. In your case, because the objects have a lookup relationship, you would have to create a trigger on the Deal object to update a field on the related opportunity record.
There might be cases when the Deal object is deleted, updated, undeleted etc and the related opportunity record has to be updated accordingly by checking if there is atleast one approved deal .

Regards,
Satish Kumar
Please mark my answer as a solution if it was helpful so it is available to others as a proper solution.
If you felt I went above and beyond, please give me Kudos by clicking on the star icon.