USD – CreateEntity, DeleteEntity, UpdateEntity Actions

Leave a comment

In Unified Service Desk, there is an action to create an entity record and delete an entity record.

For example, we have an Account hosted control that opens when in a session:

Let’s say we want to create a new contact for this account. To do this, we will use the debugger, though we can also call this as an action.

Select CreateEntity as the action, and then:

LogicalName=contact
firstname=David
lastname=Smith
parentcustomerid=EntityReference("account",[[account.accountid]g])

Note the account id is an Entity Reference using the replacement parameter for the account id:

After running this, we see the contact has been created:

To delete the contact, get the Id and run the DeleteEntity action:

If you refresh Dynamics 365, the record is deleted.

To update an entity:

LogicalName=contact
Id=3CEA6B3B-FC06-E811-80F4-3863BB35BF30
lastname=Smith II

 

ABOUT CARL DE SOUZA

Carl de Souza is a developer and architect focusing on Microsoft Dynamics 365, Power BI, Azure, and AI.

carldesouza.comLinkedIn Twitter | YouTube

 

Leave a Reply

Your email address will not be published. Required fields are marked *