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
Community Champion
Community Champion

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

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
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Users online (4,646)