Print this page

How to calculate number of campaign members on a campaign based on the checkbox fields on lead/contact.

Knowledge Article Number 000220459
Description How can the count of all leads and contacts be displayed on the campaign detail page itself.
Resolution First create a checkbox field on Contact and Lead and have it checked by default

1. Create a picklist field on campaign member object with values 'Yes' and 'No' or 'True' and 'False'
2. Create a workflow rule on 'Campaign Member' object.
a. Evaluation Criteria : Evaluate the rule when a record is created, and every time it’s edited.
b. Rule criteria : 'LEAD.Checkbox Name' = TRUE || 'CONTACT.Checkbox name' = TRUE

3. To add an immediate workflow action, click Add Workflow Action in the Immediate Workflow Actions section, and then select New Field Update

a. Update the picklist field with value 'Yes' or 'True' (created at step 1) on campaign member.

4. Define a Roll-Up Summary field on 'Campaign' object
a. Summarized Object : Campaign Member
b. Summary Type    : COUNT
c. Enter your filter criteria to select group of records in your summary calculation. (Picklist field create at step 1 equals 'Yes' or 'True')

Note: This workaround would work on all the future operations and for existing campaign member records you need to perform a DML operation

promote demote