ODBC Driver for Dynamics 365

Stored Procedures - ODBC Driver for Dynamics 365

Updating Dynamics 365 Data with Stored Procedures

Some Dynamics 365 tables don't allow the user to update their data directly with the UPDATE statement. In this case, the update is performed by calling a stored procedure. Devart ODBC Driver for Dynamics 365 offers two stored procedures — AssociateRequest and DisassociateRequest — to update data in tables. The stored procedures take a list of parameters as described below.

The AssociateRequest stored procedure executes an associate request.

Input Parameter Description

entityName1

The name of the target table to add associations to.

entityId1

The ID of the target table to add associations to.

relationship

The name of the relationship to be used for the association.

entityName2

The name of the entity to relate to the target table.

entityId2

The ID of the entity to relate to the target table.

The DisassociateRequest stored procedure executes a disassociate request.

Input Parameter Description

entityName1

The name of the target table to remove associations from.

entityId1

The ID of the target table to remove associations from.

relationship

The name of the relationship to be used for the disassociation.

entityName2

The name of the entity to disassociate from the target table.

entityId2

The ID of the entity to disassociate from the target table.

Example

call Associate('mai_mfilesquote', '8229F5C2-FBFC-EA11-B9B1-005056974312', 'mai_relationship_mfilesquote_account', 'account', '9553B0C7-3491-E911-8120-005056A1191A');
© 2015-2024 Devart. All Rights Reserved. Request Support ODBC Forum Provide Feedback