4

I need to get a report of accounts of which never purchased a certain product.

Is there a native way/report to do that?

I created a custom report.

enter image description here

What I need is the AUB-C = All accounts with a closed oppty, but which never had a certain product.

How can I achieve that?

4

To do this natively would be non-trivial and hard-coded: you could only choose one product at a time for the "without" clause. Here's how you could approach this:

  1. Create a custom field on OpportunityLineItem to store the marker for the data (e.g. product name).
  2. Create a workflow rule on OpportunityLineItem with a field update to copy Product Name (or other marker) to the field from prior step.
  3. Create a rollup summary field on Opportunity to count all records that meet a certain criteria from the prior step (e.g. Product Name equals "Acme Crowbar").
  4. Create a rollup summary field on Account to sum the value of the count from the prior step.
  5. Execute a data load, from Apex Code or the Data Loader to update all records with the workflow rules.
  6. You can now run a simple report on Accounts that identifies if they have ever purchased a given product.

To change which product you're looking to see has never been sold, you'll have to change the workflow field update, then run another data load pass.

In other words, there is no report that will give you this data easily; these types of queries are far easier to perform in Visualforce/Apex Code than in the reporting tool.

Alternatively, you could just export your data to an offline reporting tool and look for the data that way.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.