It’s often important to sort the results of your query, and in FetchXML you can do this with the <order> element. This is equivalent to the ORDER BY clause in SQL.
I’m very proud to have some more of my contributions included in the latest release of the popular FetchXML Builder tool!
So far we’ve looked at using the <attribute> and <link-entity> elements to control what columns to include in your query, but for a truly useful query you’ll likely want to select which rows to include instead of taking everything. Enter <filter>!
To combine data from different records in your query you need to use the <link-entity> element. This is equivalent to a join in SQL.
As promised, I’m starting a series of blog posts covering various aspects of FetchXML and the humble <attribute> element seems like a good place to start.
MSDyn365 MVP Jonas Rapp threw down a challenge on Twitter last week: True, I’ve been ignoring for too long…If you know some C# and some #MSDyn365 WebAPI queries – please help…! 😊Pull Requests accepted! https://t.co/7iHp6XzQbf — Jonas Rapp ᴹᴠᴾ 🇸🇪 (@rappen) March 4, 2019