question

CoreyAmoruso-7394 avatar image
1 Vote"
CoreyAmoruso-7394 asked CoreyAmoruso-7394 commented

How to associate two Dynamics 365 custom entities with a n:n relationship from Data Factory

I have built an integration between two systems (one being a Power Platform application built in Dynamics 365) using Azure Data Factory and need to associate records which are getting created by the interface to another entity in the target system. The two entities have a many to many (n:n:) relationship defined within Dynamics.

I have tried using the built in Dynamics connector within Data Factory to perform an upsert on the relationship table, however I get a message stating "The 'Create' method does not support entities of type x" with x being the relationship entity between the two primary entities.

Is there a way for me to create this association from Data Factory?

I have come up with a few workarounds but feel like this should really be handled by Data Factory connectors. Any input on these workarounds is also welcome.

1) Option 1 is to drop the built in connector and try to communicate directly with the Dynamics Web API using a Post command to associate the two records but this seems unnecessary and could get complicated in Data Factory as I need to both associate new records and disassociate records if the records need to be unlinked.

2) Option 2 is to move the relationship management portion of this integration out of Data Factory entirely and add a custom plugin to the Dynamics 365 solution which would handle the linking/unlinking of the entities based on a string field set by the integration containing a concatenated list of Ids of records that should be associated. The concern here is this plugin could potentially get triggered hundreds to thousands of times very rapidly depending on the amount of records being processed via the integration and I am not sure if there are any performance or other concerns with this approach.

azure-data-factory
· 8
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @coreyamoruso-7394,

Thanks for your query. We are reaching out to product team to get additional info about this requirement and will get back to you as soon as we have an update from the team.

We appreciate your patience.

0 Votes 0 ·

Hi @coreyamoruso-7394,

Just wanted to let you know that we are still waiting for a response from internal team on this requirement. Will keep this thread posted as soon as I have an update from the team.

Thank you for your patience.

0 Votes 0 ·

Hi @CoreyAmoruso-7394 ,

Sorry for the delay in response.

I have discussed this requirement with ADF product team and confirmed that many to many relationship is not supported by ADF currently. It is not able to create such relationship in ADF using Dynamics connector.

Hence recommended to try other options. If you further need assistance on this requirement, I would recommend you to please reach out in Dynamics 365 Community forum where we have dynamics experts and will be able to assist you better on this - https://community.dynamics.com/365/customerservice/f/dynamics-365-for-customer-service-forum

Do let us know if you have any further query related to ADF.

Thank you

0 Votes 0 ·
Show more comments

0 Answers