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.
Rolling Up Your Data:
- First, create a field on “Case” to hold your rollup results (example: Number of Open Cases). This should be a custom number field.
- Next you will open Rollup Helper and in “Step One,” select the object that the results will reside on, which is “Case” in this situation. In Rollup Helper step two, you will then select the field that you just created (Number of Open Cases).
- In Rollup Helper step three, you will select the object that contains the data you are rolling
- up (Task). You can use the default relationship field of “related to,” as that is most likely the field that relates your tasks to your cases.
- Your next selection will be the field that you are rolling up. Since we are just doing a count rollup, you can pick any field that is guaranteed to be populated, like an id, or the deleted field. Then select “Count” for the rollup type.
- You now have a rollup that will count all tasks attached to case. Since we only want to count if tasks are open, we will need to create a filter next.
Creating Your Rollup Helper Filter:
- Click the "Create a new filter" button at the bottom of the page. The first step will be to give the filter a meaningful name like, "Open Tasks". You will not need to set a limit or a sort order on the filter. In step 3 you will want to select the field that indicates a task is open and set the filter criteria to check for this (Status does not equal "Completed").
- Your rollup will now only count tasks that are open. Once the filter is complete, you can save the filter, and then save and run the setting.
- Because Rollup Helper uses normal custom fields for the rollup results, you can use your results in workflow rules, validation rules, etc.
- You can 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.