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.
Id=[[$Context.Id]] LogicalName=[[$Context.LogicalName]] 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