Hi Everyone,

Registration closes for the Plug-in Development Workshop on Thursday so now is the time to register.

Eventbrite - Plug-in Development with Dynamics CRM (April)


Here are what some of my former students have to say:

I found Mitch Milam’s workshop to be a great way to jump-start my plug-in development. Besides presenting class material in such a way that it was easy to comprehend, Mitch also provided Visual Studio templates. These templates proved to be extremely useful because they take care of the necessary plumbing when writing plug-ins, speeding up the development time. Additionally, the labs we worked on in class covered real-life scenarios directly applicable to my day-to-day work. In fact soon after the workshop, I solved a business problem by building a plug-in that was based on one of the labs we worked on in class.

Natalya Pinsker, Baltimore, MD


Mitch’s Plug-in Development workshop helped me get out of the gate and a good way down the path of C# development for Microsoft Dynamics CRM – including both Plug-ins and Workflow Assemblies. Mitch is an excellent instructor who responds to all questions and helps people along at their own pace. I highly recommend this workshop for anyone who is looking to get into the Microsoft CRM development game. It will accelerate your process and save you more than enough time to pay for itself.

Aron F.


Your class was an eye opening experience. In addition to learning about Plug-In Development this class exposed me to so many other aspects of Microsoft Dynamics CRM that I was not aware of.

Marlon R. Joseph, Application Analyst III, Houston Baptist University


You may get more details about this workshop here.

Thanks, Mitch

I am holding another Dynamics CRM Plugin Development workshop this month. The goal of the class is for me to teach you everything I know about plugin development.

When: Monday, April 21st through Thursday, April 24th. 1:00pm – 5:00pm CST each day.

Where: Online

What: This is a hands-on workshop with each student provided their own virtual development environment for the duration of the class

Cost: $895 per person (multi-student discounts available)

Note: Due to the interactive nature of this workshop, it will be limited to 10 students.

Eventbrite - Plug-in Development with Dynamics CRM (April)

Note: Registration closes at 10:00pm CDT.


  • Plugin architecture and design
    • The Dynamics CRM execution pipeline
    • The how, why, and where of plugging into Dynamics CRM
    • Performance considerations
    • Working in the sandbox
  • The development environment
    • Setup
    • Source control
    • Working in teams
  • Deploying plugins
    • To CRM
    • In a solution
    • To CRM Online (if applicable to the student population)
  • Debugging plugins
    • Synchronous vs. asynchronous
    • Full-trust vs. sandboxed
  • Custom activity architecture
  • Design features
  • Deployment
  • Asynchronous process monitoring
  • System job cleanup and maintenance
  • Open-lab time
  • Upgrade scenarios
  • Code-recovery of lost source plugin code

Thanks to our virtual development environments, the majority of our time will be spent actually designing and developing real-world plugins. Think labs. Lots and lots of labs. In fact, here is the list:

Plug-In Exercises:

  • Exercise 1: Autonumber – DateTime
  • Exercise 2: Autonumber – QueryExpression
  • Exercise 3: Autonumber – SQL
  • Exercise 4: Create Related Records
  • Exercise 5: Generate a Formal Name
  • Exercise 6: Handling Exceptions
  • Exercise 7: Multi-Entity Plugin
  • Exercise 8: Monitoring Plug-In Depth
  • Exercise 9: Auto-Assign Records
  • Exercise 10: Zip Code Lookup
  • Exercise 11: Child Record Rollup
  • Exercise 12: Data Validation
  • Exercise 13: Audit Log

Custom Workflow Activity Exercises:

  • Exercise 1: Route a New Lead
  • Exercise 2: Verify Email

In addition to the workshop materials, each student will receive additional tools and code templates to help increase their productivity as a Dynamics CRM plug-in developer.

Finally, all students are free to keep any work produced during their lab-time as well as the tools and templates used in class.

Hi Everyone,

Version 3.2 of SnapShot! has been released.

I made minor changes to this release, mainly around the Status and Status reason fields. They are now included on the Field report and the OptionSet report.

Visit the SnapShot! product page for more information and to download the sample report.

As always, thanks for your support and let me know if you have any suggestions for additional reports.

Thanks, Mitch

Every now and then I run into an issue that I should have already known about.  Either that, or I knew about it and later forgot.  Regardless, let me tell you the story of the plug-in and the missing data.



Let us say that I have a plug-in that is registered on the Create message for the Account entity. When a new Account is created, it will automatically populate a custom field with the name of the Primary Contact using code that looks like this:

var primaryContact = entity.GetAttributeValue<EntityReference>("primarycontactid");

entity["new_primarycontactname"] = 
    string.Format("{0}-{1:d}", primaryContact.Name, DateTime.Now);

This is pretty simple CRM SDK work that most of us do on a daily basis without much thought whatsoever.  All I am doing is taking the display name from the Entity Reference and using that value, along with the current date, to populate my custom field.

When the record is created with the CRM user interface, this code works perfectly. But, and there is always a but, what if we create the Account using an SDK call?

The answer is: It does not work so perfectly.

When you are creating an Entity record using the SDK the common method for creating an Entity Reference is to use code like this:

entity["primarycontactid"] = new EntityReference(Contact.EntityLogicalName, 

This is the minimum requirement for populating an Entity Reference (Lookup) field using the SDK, and is generally how everyone does it.


The Problem

The problem is our plug-in.  Since the plug-in is registered on the Create message, it will fire for each Account being created, no matter if the record is coming from the Dynamics CRM web client, from a Scribe or SSIS job, or in this case, from a customer-facing web portal.

Since we did not specify the .Name property on our primarycontactid field, it will arrive inside of the plug-in as a Null value.

This means my plugin code will produce: "-4/8/2014” instead of “John Smith-4/8/2014.

This is not a bug in CRM, this is just the way it works.


The Work Around

So if we indeed need the .Name property on the Entity Reference, we need to either specify it in our code, like this:

var primaryContact = new EntityReference(
                              new Guid("9C06869F-50C6-E211-8D6B-00155D1E5005"));
primaryContact.Name = "John Smith";

entity["primarycontactid"] = primaryContact;

OR, and this is not exactly a good thing, perform a read, from within the plug-in, of the Entity record referenced and pull back the primary field, like this:

var contact = organizationService.Retrieve(
                 new ColumnSet(new[] { "fullname" }));

return patient["fullname"].ToString();

Anyway, this is something to keep in mind should you have an applications integrated with your Dynamics CRM system.

Our monthly Dallas/Ft. Worth CRMUG meeting is this Wednesday, April 9th, from 12:00 pm to 1:30 pm Central.

If you are in the area, then please stop by to learn and share all things Dynamics CRM (plus a free lunch).

This month, Torry Landry is sharing with us the following trick:

In the Sales world we want to know which customers do NOT have a particular product so we know what we can offer.  Unfortunately, it is really difficult to search for “null” within CRM.  I scoured the CRM forums and learned how to isolate such a population. 

Last month we had a great Q&A session so this month, again bring your tips, tricks, and questions to share and ask the group.

You can register for the meeting here:



Thanks, Mitch


Hi Everyone,

Registration of this month’s workshops is now open.

Please let me know if you have any questions.


Plug-in Development with Dynamics CRM

Monday, April 21th through Thursday, April 24th. 1:00pm-5:00pm each day.

Eventbrite - Plug-in Development with Dynamics CRM (April)


JavaScript Development with Dynamics CRM

Monday, April 28th through Thursday, May 1st. 1:00pm-5:00pm each day.

Eventbrite - JavaScript Development with Dynamics CRM (April)



Pricing will be $895 per student, per workshop, with multiple-student and multiple-workshop discounts available.

Due to the interactive nature of the workshop, there is a limit of 10 students per workshop.

Hi Everyone,

Next month I will be holding two workshops for CRM developers:


Plug-in Development with Dynamics CRM

Monday, April 21th through Thursday, April 24th. 1:00pm-5:00pm each day.


JavaScript Development with Dynamics CRM

Monday, April 28th through Thursday, May 1st. 1:00pm-5:00pm each day.



Pricing will be $895 per student, per workshop, with multiple-student and multiple-workshop discounts available.

Due to the interactive nature of the workshop, there is a limit of 10 students per workshop.



Registration will open on Thursday, April 3rd.

To pre-register and secure your seat now, enter your information on the April Workshops sign-up page.

If you are doing any work at all with Dynamics CRM 2011 or 2013 you need to become a friend of PowerShell.  Because PowerShell can be a really good friend who will save you much time and trouble.


The Basics

There are several pre-packaged solutions to help you get started with PowerShell.  Here are a few:

Dynamics CRM SDK

The SDK has several sample scripts in the SampleCode\ps folder that show you how to exercise the PowerShell commandlets that ship with Dynamics CRM 2011 and 2013.


Adxstudio ALM Toolkit


Is a Lifecycle Management for Microsoft Dynamics CRM Application Solutions with both free and commercial versions.


xRM CI Framework


Is a development and testing framework that contains several PowerShell components to aid in your development and deployment efforts.

Developing Your Own CommandLets

I have had great success developing my own PowerShell commandlets to perform functions that are customer or job-specific.  Prior to PowerShell, I would have create a .NET Console application. By using PowerShell, I can create a single-use commandlet that I simply plug into my project that will give me the desired functionality.

In most cases, the code you write is fairly small and all you really need is to pass in a CRM OrganizationService object.  I’ll have some posts in the future that describes how to do that.

In the meantime, to get you started, install this package:

PowerShell Tools for Visual Studio


This will give you some really cool PowerShell functionality within Visual Studio.

And visit this page for instructions on how to get starting writing your own:

Writing a Windows PowerShell Cmdlet


Notes to myself on troubleshooting issues with SSRS.

Error: Report render failure. Error: An error has occurred during report processing. (rsProcessingAborted)

This is probably a security issue.


Useful article:

Microsoft Dynamics CRM 2011: Reports created by report wizard may fail when executing


List SPNs associated with a server:

setspn –L <servername>


SQL Reporting Services Log File Locations:

%programfiles%\Microsoft SQL Server\<SQL Server Instance>\Reporting Services\LogFiles

In most cases, <SQL Server Instance> will be something like: MSRS10_50.MSSQLSERVER

Hi Everyone,

I am created a new information-delivery service on all of my web sites called KnowledgeBits.  These are tips and tricks that I have assembled over the years while working with various Dynamics CRM-related technologies or processes and are meant to give people a head-start with their activities.

Here is the current list of KnowledgeBit channels:

  • Administration
  • .NET Development (beginning and intermediate)
  • JavaScript (beginning and intermediate)
  • Plug-ins
  • Training Strategies

Each KnowledgeBit channel will be contain between 10 and 25 broadcasts which will be sent once per day.  I am still in the development process for several of the channels so the system will not be fully live for a couple of weeks-but you can still sign up up for delivery.

You can sign up here:


Thanks, Mitch

Sign up for our new KnowledgeBits service and get news, tips and tricks and more, delivered straight to your inbox.