Skip to main content

We are looking for the best approach to having a total count of activities displayed on the Contact's detail page.

 

It's important to note that we've enabled Shared Activities.  So it's not as simple as counting all Tasks/Events where WhoId equals the Contact Id.  We also need to interrogate TaskWhoRelation (or TaskRelation) and EventWhoRelation (or EventRelation).  And since triggers are not allowed on these objects, it's making it a challenge to do.  In fact, we're running into SOQL limits when trying to run a one-time process to populate the existing Contact records.  This seems like it should have already been solved for OOTB from Salesforce but am coming up short in terms of a non-hacky way to do this.  Most things I have found talk about how to report on it but we're looking to have it on the Contact page itself.

1 risposta