You need to sign in to do that
Don't have an account?
Praneetha Murakonda
How to update campaign member status ?
Hi All,
I'm doing a trigger on campaign, I have three record types and if the record type matches with custom setting I need to create Campaign Member Status Records. As SortOrder field is required in Campaign Member Status I'm assigning the value to it from custom setting which has values [1,2,3,4]. While inserting as there will be two picklist values by default, it will get duplicate error. So I'm trying to either delete the picklist values or update the values. But, i'm not able to do it.
Please suggest
Thanks
Try this code it will work.
Did above code work for you?. Is it what ur requirement?
Hi Nagendra Prasad,
Thanks for your response. Actually my requirement is like if record type in campaign matches with the record type in my customsetting, then I need to create CampaignMemberStatus records with field mappings from custom setting. In Customsetting I have some Order__c field which has values like [1,2,3,4]. As there will be two default values in picklist, while inserting I need to delete the existing values from CampaignMemberStatus and I need to insert CampaignMemberStatus records with new status from customsetting and its Order..
If I insert the records with sortorder [1,2] will get the issue because by default the picklist will contain two values.
Thanks!