Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 55831

crm plugin SetStateRequest state.Status = new OptionSetValue(2);// changed

$
0
0
Hi ,
I want to change record that I get from link,
To do it I have to change his stasus.
My code:
 SetStateRequest state = new SetStateRequest();
                                    // Set the Request Object's Properties
                                    state.State = new OptionSetValue((int)IncidentState.Active);
                                    state.Status = new OptionSetValue(2);// changed
                                    // Point the Request to the case whose state is being changed
                                    state.EntityMoniker = new EntityReference(myEntity.EntityLogicalName, guid);
                                     // Execute the Request
                                    SetStateResponse stateSet = (SetStateResponse)service.Execute(state);
But in:  state.Status = new OptionSetValue(2);// changed
He not let me to put 2 only 1.(I mean when I put 2 he throw exception)
Why?
Thank you!


Viewing all articles
Browse latest Browse all 55831

Trending Articles