I'm trying to reopen closed or canceled Campaign Response records in custom workflow activity using SetStateRequest. This is my code:
SetStateRequest state = new SetStateRequest();
state.State = new OptionSetValue(0);
state.Status = new OptionSetValue(1);
state.EntityMoniker = new EntityReference("campaignresponse", cr.Id);
service.Execute(state);
And I get an unexpected error "2 is not a valid status code for state code CampaignResponseState.Open on campaignresponse with Id ...". 2 is the old statuscode from this record. Why SetStateRequest cannot uodate record statuscode?
Thanks for reply.
*This post is locked for comments
I have the same question (0)