QueryExpression Filter Lookup by Name instead of ID Dynamics CRM 2016

This post is originally posted here.

In CRM if we want to filter a query using a particular lookup value, e.g. if you had a lookup to Country and you wanted to query all Accounts where the Country is New Zealand, you could achieve this in a couple of different ways. Continue reading “QueryExpression Filter Lookup by Name instead of ID Dynamics CRM 2016”

Advertisements

Query data with case-insensitivity string comparison in Linq

Dealing with case sensitivity when querying CRM data

When building a custom email duplication detection, I need to query all records that match an input email ignoring case. I tried following approaches:

Continue reading “Query data with case-insensitivity string comparison in Linq”

Retrieve primary entities along with related entities with one QueryExpression

A colleague asked me how to query multiple primary records and their related records using one QueryExpression. I paused for a moment, I couldn’t answer him certainly. I thought it would be possible, so I started researching. Here is what I found.

Continue reading “Retrieve primary entities along with related entities with one QueryExpression”