cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MattTaylor Advocate I
Advocate I

Accessing Dynamics 365 Intersect Tables

Hi folks,

 

I'm wondering if someone can help with a problem I'm having. I'm trying to access a Dynamics 365 CE intersect table (N:N relationship). I've used the guide here: https://www.sikich.com/insight/how-to-find-n-n-relationships-with-dynamics-365-logic-apps-and-flow/ but unfortunately it's not working and I'm getting an error when I run/test the Flow. The error is BadGateway and looks like this: 

{
  "error": {
    "code": 502,
    "source": "europe-002.azure-apim.net",
    "clientRequestId": "9e06f5e0-546a-4001-9343-be3e137a7860",
    "message": "BadGateway",
    "innerError": {
      "status": 502,
      "message": "Dynamics 365 system returned invalid entity metadata.",
      "source": "commondataservice-we.azconn-we.p.azurewebsites.net",
      "debugInfo": "clientRequestId: 9e06f5e0-546a-4001-9343-be3e137a7860"
    }
  }
}

If I use the API URL then it doesn't return an error with the name of the table - <relationshipname>set

 

Any ideas?


Thanks in advance,


Matt

 

11 REPLIES 11
Community Support
Community Support

Re: Accessing Dynamics 365 Intersect Tables

Hi @MattTaylor ,

 

Could you please share a screenshot of the configuration of your flow?

 

Best regards,

Alice       

 

Community Support Team _ Alice Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

MattTaylor Advocate I
Advocate I

Re: Accessing Dynamics 365 Intersect Tables

Hi Alice,


Thanks for getting back to me, here's what I have: 

 

flowerror.jpg

 

This is using the Dynamics connector but I've tried with the CDS one as well. 

 

Kind regards,


Matt

MattTaylor Advocate I
Advocate I

Re: Accessing Dynamics 365 Intersect Tables

Hi Alice,


We really need to be able to do this, could you confirm that accessing intersect tables should be possible and if so link me to instructions?


Kind regards,


Matt

MohitPowerBI
Frequent Visitor

Re: Accessing Dynamics 365 Intersect Tables

Hi Matt,

 

Not sure why you are getting 'Bad Gateway' error, I am able to access the intersect entity using '<relationshipname>set'. Do you want to try using just 'List Records' action and see if you are still getting the same error. 

 

Though, I still have to figure out a way to update intersect entity using Flow.

 

Thanks,

Mohit

 

 

MattTaylor Advocate I
Advocate I

Re: Accessing Dynamics 365 Intersect Tables

Hi Mohit,

What's weird is that I was able to do this before on another environment but I just can't get it working now - I'll have another go with the 'list records' action but I'm pretty sure I already tried that. 

When I was testing before (using a canvas app) I couldn't find a way to update the intersect table, I don't believe it's possible at the moment. For that system I had to then use a custom N:N table. 

Cheers,

Matt

HeadInTheCloud
Frequent Visitor

Re: Accessing Dynamics 365 Intersect Tables

Did you ever figure out how to get the list of relationship records. I get the same error = Bad Gateway 'Dynamics 365 system returned invalid entity metadata' when I try to list records on a relationship entity '[relationshipentityname]set' even if I add a filter.

MattTaylor Advocate I
Advocate I

Re: Accessing Dynamics 365 Intersect Tables

@v-alzhan-msft,

 

I don't suppose you've had a chance to look at the Flow? Still experiencing the same issue and not had a response yet.

 

Kind regards,


Matt

MattTaylor Advocate I
Advocate I

Re: Accessing Dynamics 365 Intersect Tables

@HeadInTheCloud

 

Sorry for not replying, I've been working on another project but have come back to this - it still doesn't work. Have you found a solution? Not heard back from Community Support yet.


Cheers,


Matt

HeadInTheCloud
Frequent Visitor

Re: Accessing Dynamics 365 Intersect Tables

We ended up using the XRM Toolbox to move the set of N:N relationships from one instance of CRM to another which contained records which had been exported and imported from that instance, but the N:N connections were lost.

 

I hope this helps.

Highlighted
Hedibn Helper I
Helper I

Re: Accessing Dynamics 365 Intersect Tables

hi ,

try to use the Common data service (current environment ) and to give your fetchxml in the query and it should work.

2.png

Guilherme_Lara
Frequent Visitor

Re: Accessing Dynamics 365 Intersect Tables

I do not have the field to add Fetch XML. Was it removed?

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Automate Community!

firstImage

Now Live: Power Virtual Agents Community!

We are excited to announce the launch of Power Virtual Agents Community. Check it out now!

firstImage

New & Improved Power Automate Community Cookbook

We've updated and improved the layout and uploading format of the Power Automate Cookbook!

thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Community Summit North America

The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Users online (6,521)