Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

What process converts any given FetchXML into sql?

Posted on by 2,080

Hi

We have two CRM organisations in different states (although similar) and when I run some simple FetchXML against both using the FetchXML tester I note that the underlying sql executed is different in structure. Does anyone know what object decides the format of the underlying sql executed? Is it a crm sproc, dll or other?

The reason for asking is that on one of the organisations (our live) the sql is invalid and shows itself as an error and on the other (test) it executes fine.

Thanks

*This post is locked for comments

  • Suggested answer
    Mahadeo Matre Profile Picture
    Mahadeo Matre 17,021 on at
    RE: What process converts any given FetchXML into sql?

    easy way to get SQL of FetchXML, by running SQL profiler.

    When you execute fetchxml, CRM converts fetchxml to SQL and execute SQL queries.

    you can get query from test and production and compare where it is failing.

    NOTE: when you are running profiler on production server, it will reduce performance.

  • stuart Profile Picture
    stuart 2,080 on at
    RE: What process converts any given FetchXML into sql?

    Okay, thanks - I was hoping to avoid that route as there appears quite a hurdle before I can raise such a question. Hoping that someone can shed light on why the two different translations

  • Suggested answer
    a33ik Profile Picture
    a33ik 84,323 Most Valuable Professional on at
    RE: What process converts any given FetchXML into sql?

    Hello,

    I'm afraid that to get an answer you will have to ask product team that has an access to CRM sourcecode.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,240 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,149 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans