Get EntitySetName with XrmToolBox

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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Blog at WordPress.com.

Up ↑

%d bloggers like this: