function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
AlisonRAlisonR 

Campaign Member Trigger in Developer Sandbox

I'm creating a trigger to create a campaign member to a specific campaign. However, my edition of Salesforce only includes 1 Developer Sandbox and thus does not have the campaign needed for the trigger (no production data). What is the best way to create the trigger given this limitation? Is there a way to do it the Force.com IDE? 

Best Answer chosen by Admin (Salesforce Developers) 
Tim BarsottiTim Barsotti

You should have trigger query the campaign object by name. If it does not find the campaign, have it gracefully fail. If the campaign is found, add the member. I would create a campaigned named the same in the sandbox so you can be sure to test it before deploying.

 

Best of luck!

All Answers

gbu.varungbu.varun

Hi you can create trigger in Developer Edition and deploy it through Force.com IDE

Tim BarsottiTim Barsotti

You should have trigger query the campaign object by name. If it does not find the campaign, have it gracefully fail. If the campaign is found, add the member. I would create a campaigned named the same in the sandbox so you can be sure to test it before deploying.

 

Best of luck!

This was selected as the best answer