I have thousand of campaigns for which I have to define campaign member statuses. Manually I know it is done via the advanced configuration on the campaign itself. But I don't think it feasible to manually update thousands of campaigns like this. I don't see options to do it via dataloader nor Apex code.

Does anyone know how to do it?


I do not see any problem to change it with Apex using CampaignMemberStatus standard object. You should have an campaign ID for that:

CampaignMemberStatus ms = new CampaignMemberStatus();
ms.CampaignId = '701E0000000K21v';
ms.Label = 'New Status';
ms.SortOrder = 5;
insert ms;
  • 2
    got it to work :) things that need to bear in mind is that the user updating this via dataloader should be a marketing user, and even in apex code , it should have the marketing user enabled. also the sort order should not coincede with existing one, else an error is generated – vanessen Mar 18 '16 at 12:08
  • @vanessen You are welcome! – Sergej Utko Mar 18 '16 at 12:08

Here is the table campaignMemberStatus and fields you can update. It is available via data loader (I can't remember but you may need to allow all objects). It is also available in apex and treated just like any other object.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.