Monday 23 March 2015

Assign a record to user in CRM 2011, 2013 and 2015

Here is the code for assigning a record to other user.

AssignRequest assign = new AssignRequest
{
     //systemuser; i.e., User to whome you are assigning the entity to
     Assignee = new EntityReference("systemuser", guidUserId),
     //Current record which you are assigning to the user
     Target = new EntityReference("account", guidAccount)
};
// Execute the Request
service.Execute(assign);


--
Happy CRM'ing
Gopinath.

No comments:

Post a Comment