cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MartinHutchcpa
Helper III
Helper III

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

Thanks for your suggestion.

I meant to post the solution I found

cdi_leadid/leadid eq lead

View solution in original post

12 REPLIES 12
Brad_Groux
Super User II
Super User II

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

 

v-yamao-msft
Community Support
Community Support

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
Helper III
Helper III

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
Helper III
Helper III

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.


@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!

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
Helper III
Helper III

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"?

 

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.

Hi Mabel,

It is an add in provided by ClickDimensions.

 

Martin

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

Thanks for your suggestion.

I meant to post the solution I found

cdi_leadid/leadid eq lead

View solution in original post

evega
Frequent Visitor

Gracias @jennygb Esta fué la solución para mi.

El campo original es ownwerid entonces lo configure de la siguiente manera _nombreColumna_value eq xxxx

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Top Solution Authors
Users online (2,351)