FetchXMLBuilder icon indicating copy to clipboard operation
FetchXMLBuilder copied to clipboard

Error with Power Automate Parameters

Open simondowse opened this issue 3 years ago • 4 comments

Hi

I thought I'd let you know that I had a small issue with the Power Automate Parameters today....

I've attached a screenshot of the query builder - when I viewed the Power Automate Parameters the Expand Query option was as shown below. The link entity that is shaded grey in the screenshot did not get included, instead the one above it was duplicated - I have shown the duplicate entry in bold below.

Obviously I could get around the issue by changing the text in the expand query, but it foxed me for a while - mostly because I have absolutely no training in any of this stuff and am just learning as I go!

I hope that is helpful.

Simon

Expand Query output from View the Power Automate Parameters: cr47b_Instruction_PrimaryContact_Contact($select=cr47b_instructionref),sls_cr47b_Instruction_KeyholderContact_Contac($select=cr47b_instructionref),sls_cr47b_Instruction_VendorContact_Contact($select=cr47b_instructionref),sls_cr47b_Invoice_InvoicePrimaryContact_Conta($select=cr47b_invoiceref),cr47b_InstructionLegalParty_Contact_Contact($select=cr47b_instructionref),cr47b_InstructionLegalParty_Contact_Contact($select=cr47b_instructionref),cr47b_Invoice_Contact_Contact($select=cr47b_invoiceref),sls_cr47b_Company_Contact_Contact($select=cr47b_name)


  • Deployment: Online
  • DB Version: 9.2.22032.145
  • Connection Controls Version: 1.2021.9.46
  • XrmToolBox Version: 1.2022.2.54
  • Tool Version: 1.2022.3.1 Screenshot 2022-04-08 200526

simondowse avatar Apr 08 '22 19:04 simondowse

Thanks, I will try to see the problem, and what I can do about it.

rappen avatar Apr 12 '22 18:04 rappen

It seems like some of the power automate generated parameters aren't valid if directly copied straight into a Power Automate Flow. For example, the following Fetch XML will generate these Power Automate parameters:

image

image

But there's a couple of issues with the expand query:

  1. Empty parentheses throw an error when the Flow is executed
  2. "In" operator on a linked entity has to be placed within a $filter operator of the expand node of the linkentity, rather than being in the primary filter itself.

So the expand should be: parentcustomerid_account(),ownerid($filter=Microsoft.Dynamics.CRM.In(PropertyName='name',PropertyValues=['Test','Test2']))

And perhaps a warning about the empty parentheses (or perhaps default it to include a $select with the entity primary key if no attributes have been specified within the fetchxml)?

eleung83 avatar Jul 14 '23 15:07 eleung83

Thanks @eleung83

I know these days @MarkMpn is better at these issues... Can you have a look? I think it's issues with inner link-entities filters...

rappen avatar Aug 04 '23 16:08 rappen