Skip to content
Primary Menu
  • Home
  • About
  • Blog
  • SQL 4 CDS
  • Twitter
  • LinkedIn
  • GitHub
Mark Carrington

Data, D365, Diabetes, Lego, …

FetchXML

  • Home
  • MSDyn365
  • FetchXML
Category: FetchXML/MSDyn365/SQL 4 CDS

Dataverse Paging with Distinct

Posted On 8th December 20208th December 2020 By Mark Carringtoncomment

I hit a strange situation yesterday. I was retrieving data from Dataverse with a FetchXML query but some values were missing from my results, while others were duplicated. Turns out it’s an easy situation to get into without noticing.

Category: FetchXML

FetchXML Late Materialize

Posted On 9th October 20209th October 2020 By Mark Carrington2 Comments

The latest addition to FetchXML is Late Materialize. Turning this on or off doesn’t change the results of your query, but it does change how it’s executed behind the scenes, which could lead to some performance improvements.

Category: FetchXML/MSDyn365

Querying Metadata with FetchXML

Posted On 29th September 202029th September 2020 By Mark Carringtoncomment

I’ve looked at different ways of accessing CDS metadata recently, but there’s another way I’d overlooked – using FetchXML. CDS exposes a limited amount of metadata as special virtual entities that lets you query it using standard FetchXML syntax:

Category: FetchXML/MSDyn365/SQL 4 CDS/T-SQL

Multi-select Picklist Filtering

Posted On 27th August 202028th September 2020 By Mark Carringtoncomment

I’ve been doing some work today on filtering multi-select optionset fields in SQL 4 CDS and using the T-SQL endpoint, and I came across a few interesting quirks.

Category: FetchXML/MSDyn365

FetchXML Date Filtering

Posted On 25th August 202028th September 2020 By Mark Carrington2 Comments

One great option in FetchXML is to filter dates using a relative filter such as “this week”, “older than 2 years” etc. This is particularly helpful when you build a view, as it will automatically build the date criteria each time so your view is always up to date.

Category: FetchXML/MSDyn365

Column Comparisons in FetchXML

Posted On 15th July 202028th September 2020 By Mark Carrington4 Comments

I was very pleased today to see a new feature in FetchXML – column comparisons! This allows us to build queries that compares the values in one column against those in another. Previously we’ve only been able to compare a column against a constant value.

Category: FetchXML/MSDyn365

Inside FetchXML pt 10 – link-entity (again)

Posted On 5th April 202028th September 2020 By Mark Carringtoncomment

A follow-up on my previous post on link-entity, prompted by this tweet from Daryl LaBar: Was unaware of the new join operators. @jordimontana @XrmWizard have either of you used these, or know what they are supposed to do? The documentation is rather lacking…https://t.co/Nr4AyZMzb2 — Daryl LaBar (@ddlabar) April 2, 2020

Category: FetchXML/MSDyn365

Inside FetchXML pt 9 – distinct

Posted On 3rd April 202028th September 2020 By Mark Carrington2 Comments

You can ensure your query only produces each row once using the distinct attribute. For example, if you have multiple entries for the same company name you can get the list of unique names using:

Category: FetchXML/MSDyn365

Inside FetchXML pt 8 – page, count & top

Posted On 1st April 202028th September 2020 By Mark Carringtoncomment

By default you’ll get up to 5,000 records that match your query. The top-level <fetch> element supports a few options to help you control this:

Category: FetchXML/MSDyn365

Inside FetchXML pt 7 – rowaggregate

Posted On 29th March 202028th September 2020 By Mark Carringtoncomment

If you’re using any hierarchies in your data, you’ve probably noticed the icon in your main grid views that you can click on to show the hierarchy view when records have a parent or children. It’s simple to work out if a record has a parent – just check if Continue Reading

Posts navigation

1 2 Next

Copyright © All rights reserved Theme: Infinity Blog by Themeinwp