cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Resolver I
Resolver I

oData Filter query for dynamics 365

Hi,

I'm having problems with a Flow that is trying to get a list of records from a custom entity in Dynamics 365.

The custom entity [Contact Roles] has a lookup column to the Contact entity and the field is called abs_ContactId.

A Contact can have multiple Contact Roles which is why the Contact lookup is on the Contact Role entity.

 

So I thought it would simply be a case of:

Get Contact that's being updated

Use the Contacts' Id to get a list of Contact Roles and then update a few fields on the Contact Roles entity.

Like below:

Query1.PNG

 

However, I get this message when I try the query above:

 

"status": 400,

"message": "A binary operator with incompatible types was detected. Found operand types 'Microsoft.Dynamics.CRM.contact' and 'Edm.Guid' for operator kind 'Equal'.",
 
Am I missing something obvious here? How do I get around this?
2 ACCEPTED SOLUTIONS

Accepted Solutions
Highlighted
Super User III
Super User III

Re: oData Filter query for dynamics 365

Hello,

I have had this issue before. Use the Dynamics 365 Connector.

For some reason I have found it difficult in writing lookups using CDS connector.

Note: when using dynamics connector refer to my solution in this post to find the lookup field

https://powerusers.microsoft.com/t5/General-Power-Automate/Filter-Query-in-List-Records-not-working-...

--Josh

If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others




Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




View solution in original post

Highlighted
Resolver I
Resolver I

Re: oData Filter query for dynamics 365

Hi @Jcook 

 

I just discovered that. It's a bit weird since a few months ago you were told to use CDS for more flexibility 🙄.

Anyway, thanks for the reply 🙂

View solution in original post

9 REPLIES 9
Highlighted
Dual Super User III
Dual Super User III

Re: oData Filter query for dynamics 365

Hey @McMonty 

 

Can you place the contact dynamic content in single quotes and try again? something like: ab_Contactid eq 'selectcontacthere'

 

Hope this helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Resolver I
Resolver I

Re: oData Filter query for dynamics 365

Hi, 

yes, tried that as well with no luck.

Highlighted
Dual Super User III
Dual Super User III

Re: oData Filter query for dynamics 365

Hey @McMonty 

 

Can you share a screenshot of the error? what does  it look like? Can you try this out: remove the filter from there and add 1 to the topcount. This will get you a single record and you can check the name of the field to confirm if it is the abs_Contactid or something else?

 

Hope this Helps!

If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!

Highlighted
Community Support
Community Support

Re: oData Filter query for dynamics 365

 

Hi @McMonty ,

 

You could consider directly using Condition to filter records and update, like:

50.PNG

In addition, you can set the Degree of Parallelism to improve the efficiency of Flow execution.

49.PNG

 

Best Regards,

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

Re: oData Filter query for dynamics 365

 

Hi @McMonty ,

 

In addition, you can get the file name here to configure in Filter Query.

51.PNG

Like:

52.PNG

 

Best Regards,

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

Re: oData Filter query for dynamics 365

Hi, here's the Body text:

{
"status": 400,
"message": "There is an unterminated string literal at position 54 in 'abs_ContactId eq '8c028466-7530-41f7-bd90-6f67387e287b'.",
"source": "xxxlive.crm11.dynamics.com",
"errors": [],
"debugInfo": "clientRequestId: f8f6aae9-a8c2-4cfb-bbfc-66ce9dcb3031"
}
 
 
Highlighted
Resolver I
Resolver I

Re: oData Filter query for dynamics 365

Hi, 

I get the message below if I simply type the id in: 

abs_contactid eq '43838B79-9826-4F65-A81F-0B03358048DE'

 
{
"status": 400,
"message": "Could not find a property named 'abs_contactid' on type 'Microsoft.Dynamics.CRM.abs_contactemail'.",
"source": "xxxlive.crm11.dynamics.com",
"errors": [],
"debugInfo": "clientRequestId: e2bb127d-fb43-4fa1-a470-96f47b823a56"
}
 
That field exists on the entity which makes the above message even more confusing. Could it be something to do with that it is a lookup field?
Highlighted
Super User III
Super User III

Re: oData Filter query for dynamics 365

Hello,

I have had this issue before. Use the Dynamics 365 Connector.

For some reason I have found it difficult in writing lookups using CDS connector.

Note: when using dynamics connector refer to my solution in this post to find the lookup field

https://powerusers.microsoft.com/t5/General-Power-Automate/Filter-Query-in-List-Records-not-working-...

--Josh

If you like my post please hit the "Thumbs Up" -- If my post solved your issue please "Mark as a Solution" to help others




Did I answer your question? Mark my post as a solution!

If you like my post please hit the Thumbs Up


Proud to be a Flownaut!


Check out my blog for Power Automate tips, tricks, and guides
FlowAltDelete




View solution in original post

Highlighted
Resolver I
Resolver I

Re: oData Filter query for dynamics 365

Hi @Jcook 

 

I just discovered that. It's a bit weird since a few months ago you were told to use CDS for more flexibility 🙄.

Anyway, thanks for the reply 🙂

View solution in original post

Helpful resources

Announcements
secondImage

August 2020 CYST Winners!

Check out the winners of the recent 'Can You Solve These?' community challenge!

thirdImage

Experience what's new for Power Automate

Join us for an in-depth look at the new Power Automate features and capabilities at the free Microsoft Business Applications Launch Event.

firstImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

thirdimage

Power Automate Community User Group Member Badge

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

Top Solution Authors
Top Kudoed Authors
Users online (4,883)