cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MartinHutchcpa
Level: Powered On

Odata Filter query for dynamics crm

I am trying to return a list of Dynamics CRM records from an entity using a related Lead record.

Can anybody advise the correct syntax as I keep getting the following error?

"message": "A binary operator with incompatible types was detected. Found operand types 'Microsoft.Dynamics.CRM.lead' and 'Edm.Guid' for operator kind 'Equal'."
 
I have tried various permutations including, converting the lead id to a string. 
 
The lead id is being returned as an item in a collection from a previous list records step.
 
 
Flow.png
1 ACCEPTED SOLUTION

Accepted Solutions
MartinHutchcpa
Level: Powered On

Re: bel,Re: Odata Filter query for dynamics crm

Thanks for your suggestion.

I meant to post the solution I found

cdi_leadid/leadid eq lead

View solution in original post

11 REPLIES 11
Super User
Super User

Re: Odata Filter query for dynamics crm

Have you tried removing the single quotes? If the Lead attribute is actually presenting the GUID, then single quotes are not required. 

 

Community Support Team
Community Support Team

Re: Odata Filter query for dynamics crm

Hi @MartinHutchcpa ,

 

I have made a similar test using Filter query in List record action in entity Opportunities.

Please check the following image for a reference.

1.PNG

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MartinHutchcpa
Level: Powered On

Re: Odata Filter query for dynamics crm

Unfortunately when I remove the quotes I still get the same error.

This is the filter query from the failed run. 

cdi_leadid eq fce4d0b8-91b2-e811-a956-000d3ab1ab19

 

 

MartinHutchcpa
Level: Powered On

Re: Odata Filter query for dynamics crm

Thanks for  your reply Mabel, however can you help me by telling me what is different in your example please, as I have now removed the single quotes and I still get the same error.

Super User
Super User

Re: Odata Filter query for dynamics crm


@MartinHutchcpa wrote:

Unfortunately when I remove the quotes I still get the same error.

This is the filter query from the failed run. 

cdi_leadid eq fce4d0b8-91b2-e811-a956-000d3ab1ab19


From the screenshot of the one step you provided us in your initial post, it should work. You must have something higher up in your flow that may be causing the issue. Can you provided a screenshot of your entire flow for review?

Can you also please provide a full screenshot of the full error message you are receiving?

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. THANKS!

MartinHutchcpa
Level: Powered On

Re: Odata Filter query for dynamics crm

It is a fairly simple flow.

{
"status": 400,
"message": "A binary operator with incompatible types was detected. Found operand types 'Microsoft.Dynamics.CRM.lead' and 'Edm.Guid' for operator kind 'Equal'.",
"source": "xxx.crm4.dynamics.com",
"errors": [],
"debugInfo": "clientRequestId: 55668ac8-bf5f-4668-9743-38d3f5b9d2cd"
}
 
flow.png
MartinHutchcpa
Level: Powered On

Re: Odata Filter query for dynamics crm

Having posted a support request to Microsoft for this, I have had no response to that for 4 days, although their SLA states 8 hours.

Does anyone here know what could be wrong or is it in the "too hard pile"?

 

Community Support Team
Community Support Team

Re: Odata Filter query for dynamics crm

Hi @MartinHutchcpa ,

 

Is entity Visits a custom entity?

I don’t have a Visits entity on my side.

 

Best regards,

Mabel

 

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
MartinHutchcpa
Level: Powered On

bel,Re: Odata Filter query for dynamics crm

Hi Mabel,

It is an add in provided by ClickDimensions.

 

Martin

jennygb
Level: Power Up

Re: bel,Re: Odata Filter query for dynamics crm

Have you tried using _cdi_leadid_value  instead of cdi_leadid to refer to the lookup field in the Filter Query?

 

Example:  _cdi_leadid_value eq LeadDynamicContnetGoesHere

MartinHutchcpa
Level: Powered On

Re: bel,Re: Odata Filter query for dynamics crm

Thanks for your suggestion.

I meant to post the solution I found

cdi_leadid/leadid eq lead

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

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

firstImage

Incoming: New and improved badges!

We've given our badges an overhaul and also added some brand new ones!

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

sixthImage

Power Platform World Tour

Find out where you can attend!

seventhimage

Webinars & Video Gallery

Watch & learn from the Power Automate Community Video Gallery!

Top Kudoed Authors
Users Online
Currently online: 336 members 5,778 guests
Please welcome our newest community members: