I'm not sure whether this works or whether I'm doing something wrong so here goes: I want to have a COUNT rollup summary field that summarizes opportunity products that have a value in a lookup field. If I set the COUNT to summarize products where this field does not equal '' (ie. empty) it's always set as 0, even though one or more products do have a value in that field. Is this just a limitation of roll-up summary fields?
1 Answer
From Salesforce documentation:
You can’t use long text area, multi-select picklist, Description fields, system fields like Last Activity, cross-object formula fields, and lookup fields in the field column of roll-up summary filters.
So what you want is not natively possible in Salesforce.
You can use this workaroud.
Create a new field on you child object named as "Duplicate Lookup Text" of type Text
Create a Workflow Rule, Created and Edited to subsequently meet the criteria, and criteria being the Lookup Field is not null
Create a Rollup- Summary on Parent Object for Count and use the filter criteria as Duplicate Lookup Text is not null
Voila Done.
Src: https://help.salesforce.com/articleView?id=fields_about_roll_up_summary_fields.htm&type=5
-
-
@cropredy that came to my mind, but as I am not writing code and using standard SF functionality I didnt bother. If it gets more messier, DLRS is the way forward Commented Dec 10, 2018 at 20:51
-
1N.B. DLRS does not require writing any code and avoids the WFR– cropredyCommented Dec 10, 2018 at 20:53
-
-
1Thanks Pranay, your solution is the easiest way to accomplish this. I've been looking into DLRS and will defo find a way using that in the future! Have some points on me for your help :)– akarnidCommented Dec 10, 2018 at 22:10