Count the Number of Tasks on an Open Case

Share

Free Salesforce business guides to help admins/developers, project managers, sales managers, and decision makers. Download the free PDF series now: Reinventing Your Business, Reimagining Your Salesforce®.

Problem

In Salesforce, maximizing efficiency and productivity is the name of the game. If you can't see or find your information exactly where you would like to, this limits company performance. If you have ever wondered what the best way for seeing the number of tasks on an open case is, or how to prevent cases from being closed if they still have open tasks, Rollup Helper has the perfect solution for you.

Solution

Count the number of open tasks by creating a rollup. Then, use the results within workflow rules, validation rules, etc... that will prevent the Case record from being closed if the count is higher than 0.

The first step is to create a new custom field (using Number as the data type) on the Case object. You can name the field "Number of Open Cases."

Create the rollup:

  • Select Case as the Destination Object
  • Select "Number of Open Cases" as the Target Field
  • Select Task as the Child Object
  • Use the default Relationship Field
  • Select Count as the Rollup Type. Note: IsDeleted is the default source field used for count rollups since it is a simple boolean field that exists on all records
  • Create a New Filter
    • Name the filter in step 1 (e.g. Open Tasks) then skip to step 3
    • In step 3 select the Status field
    • Select not equal to as the Operator
    • Select Completed for the Criteria
      Count Number of Tasks on an Open Case Filter
  • Save the filter and then Save and Run the rollup
    Count Number of Tasks on an Open Case Rollup

You can now place a validation rule on “Case” using the “number of open tasks” field, which will prevent the record from being closed if the count is higher than 0. You now have a more productive, manageable Salesforce environment! 


Need help?
Schedule a one-on-one demo

Tags: Case, COUNT, Task
Identify The Primary Contact On An Account Rollup Helper Use Case Library USE CASE: Viewing the Largest Quote on an Account
Chat Offline
Contact Us Here