0

Products belong to family "ABC".

to achieve this i tried creating formula field on Opportunity Product to pull the family value from Product. But i can't use formula field on rollup summary's filter condition on opporunity. so that is one dead end.

Another solution i tried is creating another text field on Opportunity Product to store family value and updated it using workflow(create&edit) with Product family value. But this workflow will not fire if Products family was updated. so thats other end.

I am out of ideas...Anyone has any other ideas?

1 Answer 1

3

You can use DLRS in Scheduled mode to refresh declaratively-created rollups on a regular basis to account for changes to the Product Family.

Alternately, you can pursue the second solution you already explored by adding automation or code (either a trigger or a Process Builder + Flow combination) running on updates to the Product. That automation would then propagate changes to the Product Family field to related Opportunity Products, ensuring that your native rollup summary field on Opportunity will recalculate in real time.

Note that you cannot achieve this with Workflow Rules or Process Builder alone; you need a Process calling a Flow to query and update all of the linked Opportunity Products.

There isn't a magic bullet to achieve three-object rollups like this, but it can be done by combining the tools we already have.

4
  • What I typically do in this scenario is set the DLRS rollup to real-time, but then also add the scheduled rollup. Bonus is that in the newest versions of DLRS, batch recalculations do not trigger DML writes to records where the calculated value matches what's already on the record. In orgs with larger data volumes it still may make sense to restrict the scheduled rollup to only records whose parents changed recently.
    – Charles T
    Commented Jul 27, 2018 at 3:01
  • I see what you mean, @CharlesT; I like the purely scheduled solution for user education purposes. It's much easier, to me, to communicate that data is updated overnight than that certain classes of changes are realtime and others are not.
    – David Reed
    Commented Jul 27, 2018 at 12:26
  • Thanks for comments...I think DLRS is difficult to implement in short time that i have...so i am going for trigger on Product + workflow on opportunity product. Combination of these two will get me the correct family value on opportunity product which i will use in rollup. Commented Jul 27, 2018 at 13:29
  • @DavidReed I use the realtime-scheduled combo in use cases where the majority of changes (creating/editing the child) would come from the trigger, but a significant minority (editing the child's other parent) require the schedule.
    – Charles T
    Commented Jul 27, 2018 at 17:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .