Dynamically setting field requiredlevel attributes in Dynamics CRM 2011

One of the things I like best about the Dynamics CRM 2011 form object model is that it exposes the requiredlevel attribute for form fields, so you can dynamically set fields as required or not in response to user actions. This is great if you have different types of a »

How to unit test C# Dynamics CRM interface code - part III

In parts one and two of this series, I gave an introduction to unit testing Dynamics CRM C# interfaces code with mock objects using NUnit and Moq, and I showed code samples for a couple of different scenarios. In this post I will show how to work with CRM metadata »

How to unit test C# Dynamics CRM interface code - part II

Earlier this week I wrote a post that gave an introduction to unit testing Dynamics CRM C# interfaces code with mock objects using NUnit and Moq. The sample code in that post was extremely simple, so I wanted to follow up with a more complex example that shows how to »

How to unit test C# Dynamics CRM interface code

A while back I wrote a post that gave a high-level overview of some of the tools I had used at a previous job to do unit testing of Dynamics CRM interfaces code, but I didn't get into the why or how. Here is an introduction to unit testing Dynamics »

Simple C# class to populate datatable from FetchXML

I've typically preferred to access Dynamics CRM data using SQL queries, so I have never worked much with FetchXML. I've recently started working on a bit of a hobby project where it makes more sense to populate a datatable from using FetchXML than to use a SQL query, but unfortunately »