Campaign: How to make the "Active" checkbox checked by default when New campaign is created - Answers - Salesforce Trailblazer Community
Trailblazer Community
Ask Search:
Matthew StraneyMatthew Straney 

Campaign: How to make the "Active" checkbox checked by default when New campaign is created

  Hello #AwesomeAdmins and #DopeDevelopers

    I'm trying to write something that will have the Active checkbox checked by default whenever a new campaign is created.  We would like Active to be a read only field and only be updated via data load submitted by marketing every 3 months.  We will be using Pardot as well.  
  

User-added image

  
Best Answer chosen by Matthew Straney
Steve DoddSteve Dodd
Hi Matthew,

You could create a validation rule on the Campaign object to prevent the user from checking the Active box upon create:
ISNEW() 
&& 
IsActive=TRUE

The just use a workflow rule to update the Active checkbox upon create with a field update:

Evaluate the rule when a record is: "created"
Rule Criteria -  Campaign: Campaign Name NOT EQUAL TO null
Field Update: Campaign: Active - Checkbox - New Field Value = TRUE

You may also need a second validation rule that restricts anyone other than System Admin or Marketing from editing that field on any Campaigns that have already been created so you can update it using Data Loader in the future.

Try making it read-only using field level security first and it if it works you won't need the validation rule - but I'm not sure if FLS works with IsActive.

All Answers

Sunil SarillaSunil Sarilla
Hi Matthew,
You can use Workflow or Process Builder that updates the Active field to True whenever a New Campaign is created.
Make the field read only for all Profiles other than the marketing/System Admin Profiles.
Steve DoddSteve Dodd
Hi Matthew,

You could create a validation rule on the Campaign object to prevent the user from checking the Active box upon create:
ISNEW() 
&& 
IsActive=TRUE

The just use a workflow rule to update the Active checkbox upon create with a field update:

Evaluate the rule when a record is: "created"
Rule Criteria -  Campaign: Campaign Name NOT EQUAL TO null
Field Update: Campaign: Active - Checkbox - New Field Value = TRUE

You may also need a second validation rule that restricts anyone other than System Admin or Marketing from editing that field on any Campaigns that have already been created so you can update it using Data Loader in the future.

Try making it read-only using field level security first and it if it works you won't need the validation rule - but I'm not sure if FLS works with IsActive.
This was selected as the best answer
Naveen DhanarajNaveen Dhanaraj
I would Suggest you to use Workflow.Because More faster than Process Builder