USD – Update Owner

I recently answered a question about how to update the owner of a record in Unified Service Desk for Microsoft Dynamics CRM. I thought the question was really good so decided to do a quick blog post with my answer.

The question was about wanting to set the owner field, say from an agent script to assign the owner of the currently selected record to the current user.

To do this you’d create an “UpdateEntity” action. (From you Global Manager)

Assuming the entity you wish to change the owner on is in the current context the action I’m showing below in the debugger would do the trick. If the entity isn’t in the context you can always replace $Context with the required entity name.



ownerid = EntityReference(systemuser,[[systemuser.systemuserid]g])

  • Id=[[$Context.Id]], this is the ID of the record you want to update. In my example this would be whatever record is in the current context. Alternatively you could enter something like Id=[[contact.Id]]
  • LogicalName=[[$Context.LogicalName]], this is the type of record. Alternatively you could enter something like LogicalName=contact
  • ownerid = EntityReference(systemuser,[[systemuser.systemuserid]g]), ownerid is the field to be changed. Then use EntityReference to add the details of the current user.


Hopefully this is a simple example of how to change the owner of an entity and you can adapt this for your own purposes. J

7 thoughts on “USD – Update Owner

  1. Hi, don’t you think this can also be done by simply clicking the “Assign” button through ribbon, whose access we often provide to agent [ As hiding a navigation bar is logical but restricting access of ribbon can abide the agent from doing, what he ought to do, (might be I am wrong in some cases).] Also it’s depend on the security role of user which work same in Dynamics CRM & USD.


    • I agree you can simply use the assign button! This is just another option.

      If “all” you want is an assign button logic that that is best done from the CRM form.

      But it might be useful if you wanted to group several actions into one step. With changing the ownership being just one of them.

      Or maybe the ownership could change automatically based on some other logic.

      I think this could be useful in some circumstances.


  2. Neil,

    You would only want this to run once, so say a customer record pops through CTI then it assigns the record to the current agent, if there is a second call to this customer record by a different agent we wouldn’t want it to fire, so would an execute on expression true come into play the second time?



    • If you want the action to run once or maybe never if the entity is already assigned to the current user you could simply add a condition to compare the onwer from the context with the usersystem user.


  3. Pingback: USD – The Book | Microsoft Dynamics CRM and Unified Service Desk

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s