Filter By Junction Object? #645
Unanswered
danmalone89
asked this question in
Q&A
Replies: 1 comment 4 replies
-
@jamessimone Any chance you would chime in on this? This rollup is a punch list item for an org we're launching next month. I've tried this in the
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, this is my first time using this package, and I have a scenario I'm not exactly sure how to tackle (or if it's even possible to tackle) using apex-rollups. While I've got apex-rollups installed and working in at least a couple scenarios, I'm struggling with one that involves filtering a rollup by a junction object.
Background: We're implementing the new standard data model for Financial Services Cloud. This means we do not have the managed package version of FSC, and so we do not have the out-of-the-box rollups that come with it.
The Use Case
We need to sum the value of accounts belonging to a person, and then also roll those financial account values up to their household. Specifically:
FinancialAccount
has a Master-Detail relationship toFinancialAccountParty
(detail).FinancialAccountParty
object has a picklist field calledRole
.Primary Owner
(not roles likeBeneficiary
).The Core Questions
FinancialAccountParty
records point to the sameFinancialAccount
?Role
isPrimary Owner
?Id IN ( SELECT FinancialAccountId FROM FinancialAccountParty WHERE Role = 'Primary Owner' )
Data Model Overview
Current Attempt
I have a rollup configuration that mostly works, but it double counts financial account values when there is more than one
FinancialAccountParty
record related to the sameFinancialAccount
. Here’s a snapshot:Example Outcome of the CMDT above
As you can see, the total AUM is overstated because the rollup double-counts the joint account for each “Primary Owner” or “Joint Owner” record.
I’d love some help or confirmation on whether this scenario can be solved solely via CMDT configuration, or if it requires a custom approach. Thanks so much for your assistance!
Beta Was this translation helpful? Give feedback.
All reactions