0

I have a Contact Object and a custom object called "License". On the License object custom field "Type" specifics if it is an "Evaluation" or "Commercial". Additionally, custom field "Product" specifics the name of the Product this license is for.

Licenses are connected to Contacts via Lookup field on the License. A Contact can have many License but a License can only have one Contact.

I am trying to build a report that shows Contacts that have a License of Type Evaluation and another License of Type Commercial for the same Product.

Can anyone provide suggestions on how to build a report that could solve this? I have been working with a joined report but cannot figure out how to show Contacts that only have BOTH of these licenses.

3
  • This is not possible to achieve with your current schema. We can build a similar report but that will have all type of contacts. Commented Jan 12, 2016 at 0:34
  • Additionally what type of custom field is products, String or lookup? Commented Jan 12, 2016 at 0:35
  • Product is a string field Commented Jan 12, 2016 at 2:33

1 Answer 1

0

A workaround to this problem (assuming that License is not a detail of a master-detail from Contact)

  1. Install package Declarative Lookup Rollup Summaries (free)
  2. Using Force.com UI, create two custom Integer fields on Contact - EvalLicCount__c and CommercialLicCount__c. Use the DLRS point and click interface to specify that DLRS shall count the occurrences of children Eval and Commercial licenses, resp. and save the results into your new custom integer fields
  3. Touch all of your Licenses (so the DLRS triggers are fired) or use the DLRS sweep feature to update the counts in Contact.

DLRS will take care of inserts, updates, deletes, and undeletes on your License

Your report can now filter on Contacts where EvalLicCount__c > 0 and CommercialLicCount__c > 0

This is by no means a scalable solution if you have dozens of license types but could be quite workable in your org

If License is a detail to Contact in a master-detail relationship, use OOB Roll Up Summary (RSF) fields to mimic the above.

You must log in to answer this question.

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