Update SDK Message for Specialized Operations,Microsoft Dynamics CRM 2015 Online Spring Update
Views (324)
Many new features were released in the Microsoft Dynamics CRM 2015 Online Spring Update. One of the features that was enhanced for developers is the update SDK message.
Before the update, specialized update request messages were required to perform the following operations:
· AssignRequest
· SetStateRequest
· SetParentSystemUserRequest
· SetParentTeamRequest
· SetParentBusinessUnitRequest
· SetBusinessSystemUserRequest
· SetBusinessEquipmentRequest
All of these messages deprecated during the update and these operations can now be performed using the Update SDK service call.
Consider the business scenarios that require the following operations in CRM:
· Changing the ownership of a record.
· De-activating a record.
Before this update, CRM had to execute the following SDK operations:
· AssignRequest
· SetStateRequest
With this update, all of the above operations can now be performed using a single CRM service call. Below is the sample code needed to perform the assign and de-activate operations along with regular update CRM calls:
private static void AssignAndChangeStatus(Guid accountId, OrganizationService orgService)
{
Entity objAcc = new Entity(“account”);
objAcc[“ownerid”] = new EntityReference(“systemuser”, new Guid(“D693EB00-894A-E511-80DA-3863BB349DA8”));
objAcc[“statecode”] = new OptionSetValue(1);
objAcc[“statuscode”] = new OptionSetValue(2);
objAcc[“accountid”] = accountId;
orgService.Update(objAcc);
}

Like
Report
*This post is locked for comments