Here is same code
try
{
OrganizationRequest _request = new OrganizationRequest();
_request.RequestName = "SetState";
_request.Parameters = new Microsoft.Xrm.Sdk.ParameterCollection();
_request.Parameters.Add(new KeyValuePair<string, object>("EntityMoniker", new EntityReference() { Id =
_ID, LogicalName = "opportunity"
}));
_request.Parameters.Add(new KeyValuePair<string, object>("Status", new
OptionSetValue() { Value = 1 }));
_request.Parameters.Add(new KeyValuePair<string, object>("State", new
OptionSetValue() { Value = 0 }));
_Service.Execute(_request);
}
catch (Exception _ex)
{
throw _ex;
}
Thx a ton !
ReplyDeleteWTB a ReOpenOpportunityRequest !
It is quite beneficial, although think about the facts when it reaches this target. database management
ReplyDelete