Sara Lagerquist


Home | Pages | Archives


Get EntitySetName with XrmToolBox

3 September, 2020 08:02

You know that annoying error you get when trying to populate a lookup field in Power Automate with the Current Environment connector? And you might have found blog posts that the solution is to set the EntitySetName before the dynamic data? Good so far – but how the hell do you find the EntitySetName? Let me help you out.

The Problem (again)

If you try to populate a CDS lookup with a dynamic value when using the CDS Current Environment Connector like this:

You will get the unpleasant error message like this:

Resource not found for the segment

Annoying as f… since it worked perfectly well to do exactly this with the old connector.

The solution

The solution to this unpleasant problem is to add the EntitySetName of the lookup you’re trying to populate (yes that is including prefix) and the dynamic data within parentheses.

So USUALLY you can find the out of the box entities EntitySetName here and they are usually the schemaname in plural. And USUALLY you can use the same pattern with your custom entities too – unless sometimes when your custom entity ends with an S the EntitySetName becomes something that Gollum would say from the Lord of the Ring movies. For example an entity called “sara_News” would be “sara_newses”. And don’t get me started on my tomatoes entity…

Classic Gollum

The Trick

And now you’re like – I don’t care about your bad jokes where the hell did you get that screenshot from?! Well.

Get XrmToolBox if you haven’t yet, connect to your lovely organisation and get the Metadata Browser tool (special thanks to the awesome Tanguy who created it).

Search for your entity name, your prefix or what ever and scroooooll til the E’s and you’ll find EntitySetName.

Tadaa. No more guessing, trial and error running the flow, breaking vases and coffee cups in the process.

Summary

How many times can you write the word EntitySetName in one blog post? Many. Ciao.

Posted by Sara Lagerquist

Categories: CDS, Power Automate

Tags: , , ,

5 Responses to “Get EntitySetName with XrmToolBox”

  1. […] will help you convert from the logical name of an entity to the collection name that you need to use in Power Automate and anywhere else you use OData / Web API […]

    Like

    By Querying Metadata with FetchXML - Mark Carrington on 29 September, 2020 at 14:27

  2. […] […]

    Like

    By Child flows in Power Automate Compared to Child Workflows - Microsoft Dynamics 365 Community on 27 November, 2020 at 17:32

  3. Thanks! Very Helpful

    Like

    By Angel on 3 December, 2020 at 01:03

  4. […] You know that annoying error you get when trying to populate a lookup field in Power Automate with the Current Environment connector? And you might have found blog posts that the solution is to set the EntitySetName before the dynamic data? Good so far – but how the hell do you find the EntitySetName? Let… Continue Reading → […]

    Like

    By Child flows in Power Automate Compared to Child Workflows - Microsoft Dynamics 365 Community on 12 December, 2020 at 00:39

  5. Super helpful post ! Thanks !

    Like

    By Nikhil on 8 July, 2022 at 04:12

Leave a Reply



Mobile Site | Full Site


Get a free blog at WordPress.com Theme: WordPress Mobile Edition by Alex King.