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:
Annoying as f… since it worked perfectly well to do exactly this with the old connector.
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…
And now you’re like – I don’t care about your bad jokes where the hell did you get that screenshot from?! Well.
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.
How many times can you write the word EntitySetName in one blog post? Many. Ciao.