Looking for PowerObjects? Don’t worry, you’re in the right place! We’ve been part of HCL for several years, and we’ve now taken the final step in our acquisition journey: moving our website to the HCL domain. Nothing else is changing – we are still fanatically focused on Microsoft Business Applications!

PowerObjects Blog 

for Microsoft Business Applications


Update SDK Message for Specialized Operations

Post Author: Joe D365 |

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, and in today’s blog, we will describe this enhancement in more detail.

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:

  1. Changing the ownership of a record.
  2. De-activating a record.

Before this update, CRM had to execute the following SDK operations:

  1. AssignRequest
  2. 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);

}

That’s all for the blog today, readers. Looking to take your Dynamics CRM knowledge to the next level or get a head start on 2016? Consider attending one our CRM boot camps or other training events that PowerObjects offers monthly. Spots are open NOW for CRM 2016 boot camps so don’t miss out!

Happy CRM’ing!

Joe CRM
By Joe D365
Joe D365 is a Microsoft Dynamics 365 superhero who runs on pure Dynamics adrenaline. As the face of PowerObjects, Joe D365’s mission is to reveal innovative ways to use Dynamics 365 and bring the application to more businesses and organizations around the world.

PowerObjects Recommends