web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

FetchXML filter by EntityReference prop. Name

(0) ShareShare
ReportReport
Posted on by

Hi all.
I'm using fetchXML to fetch the data. I have EntityColection in result of _service.RetrieveMultiple(xml_query). Entity has attributes of type Microsoft.Xrm.Sdk.EntityReference. These attributes contain such properties "Id","Name","LogicalName".
Please, help me to build the correct query to set filters and orders by this fields.
For example, sql is like this:

SELECT Id, name, cur_price, manufacturerId_Name
FROM tb_goods WHERE cur_price > 10 AND manufacturerId_Name LIKE '%jumbo%'
ORDER BY manufacturerId_Name
LIMIT 10

I'm trying to make it on server (c#). Is it possible to use manufacturerId_Name in query directly ? Maybe it needs to use some chars like '/' , '|' ?

Thank you for any help

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: FetchXML filter by EntityReference prop. Name

    Thank you, guys !

    I've just tried to use fetchxml builder - pretty nice tool!

    PS

    I didn't try Advanced search because it wasn't set on my server , maybe I missed something.

  • Verified answer
    Royal King Profile Picture
    27,686 on at
    RE: FetchXML filter by EntityReference prop. Name

    you could use fetchxml builder tool from Xrmtoolbox to build query and test result before using it in the code

    https://fxb.codeplex.com/

  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at
    RE: FetchXML filter by EntityReference prop. Name

    advanced find is best option to generate fetchxml..

    and you can convert your sql into fetchxml by using

    http://www.sql2fetchxml.com/

    Hope this will help

  • Suggested answer
    Rajkumar Rajaraman Profile Picture
    on at
    RE: FetchXML filter by EntityReference prop. Name

    Hi Asgur,

    Refer the following links:

    social.microsoft.com/.../crm-2013-c-plugin-working-with-fetchxml-query

    www.resultondemand.nl/.../273dd192-cc12-4ab0-84ec-1ea1b8f367c3.htm

    Hope this helps.

    Regards,

    R. Rajkumar

  • Suggested answer
    Bas van de Sande Profile Picture
    4,383 on at
    RE: FetchXML filter by EntityReference prop. Name

    What you can do is the following:  Use the Advanced Find within CRM.  There you can create the query. Press the "FetchXML download" button  and there you have the FetchXML needed :)

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Community Member Profile Picture

Community Member 2

#2
Christoph Pock Profile Picture

Christoph Pock 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans