Hello,
I have created a code that will go through all child records of a specific type and update their status based on a field on the parent record.
The problem I am facing is that I am getting an exception when running the last execute statement:
SetStateResponse stateSet = (SetStateResponse)service.Execute(state);
The code is doing everything correctly up this stage:
SetStateRequest state = new SetStateRequest();
state.State = new OptionSetValue(0);
state.Status = new OptionSetValue(1);
EntityReference caseReference = new EntityReference("mit_keyasset", act.Id);
state.EntityMoniker = caseReference;
SetStateResponse stateSet = (SetStateResponse)service.Execute(state);
The exception I am receiving seem to be as following FaultException<OrganizationServiceFault>
Hope that anyone can give me a hand on this.