Hi Everyone,

I just wanted to remind you that registration for the Extending Microsoft Dynamics CRM 2013 workshop ends on Thursday, July 17th at 10:00am CDT.

For more information about this workshop, please review the following:



When you’re ready to register, just click this button:

Eventbrite - Extending Dynamics CRM 2013


Thanks and I’ll be talking to some of you next week.


A new version of SnapShot! for Dynamics CRM is available so if you are needing to produce the ultimate set of documentation for your Dynamics CRM organization, you should check it out.

Here are the changes found in v3.3:

New Reports:

  • Personal Settings have been added to the Main Report. This report contains the relevant settings from a user’s personal options configuration.
  • User Email Settings have been added to the Main Report.  This report contains information specific to a user and the various email–related settings they may have. This report was created to help me troubleshoot user’s email configuration issues at one of my customers.



  • The new security privileges added to the Dynamics CRM 2013 Spring Wave (SO1) have been added to the security role reports.


Bug Fixes:

  • An issue was corrected related to the user counts per security role. Depending on how you generated the SnapShot! Reports, these counts could sometimes be reported as zeroes.


For More Information:

Visit the SnapShot! product page:


You can download a sample report here:


I thought I’d put together a few reasons why you, the Dynamics CRM developer, should be attending my Extending Dynamics CRM 2013 workshop on July 21st.


Reason #1: Hands-on Instruction

Can you type?  Good; because you’ll be doing a lot of exercises.

While I like to hear the sound of my own voice, nothing beats practical practice and all of my courses have lots and lots of labs.


Reason #2: The Goodies

My main job is Dynamics CRM architecture and development. I have lots of tools that help me do my job and I share some of those with my development students.

Mostly they are code samples and frameworks to help you become more productive as a Dynamics CRM developer.


Reason #3: What Other People Have To Say

Don’t take my word for it, here are what some former students had to say about the workshops they attended:

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

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,


Reason #4: There Are Only 15 Student Openings

As I mentioned, this is all hands-on so I have to put a limit to the number of students that can be part of the class.  15 people is at the upper limit of my typical classroom size, but since Microsoft doesn’t offer this course as Instructor-led, I want to make sure I can get as many people trained as possible.


Reason #5: A Bonus. Maybe.

I have a Dynamics CRM Architecture course under development and if I get enough students in the Extending course, I might just give you a free preview the week of July 28th.


So, what are you waiting for?

Sign up today. Review the original announcement for more information and a link to the registration page:


And drop me a line if you have any questions:

mitch at xrmcoaches dot com

In a multi-server environment (Development, QA/Staging/Testing, Production), you occasionally run into an issue where you need to have the latest production data in the lower environments.

Here is a set of steps that will help you move the Production CRM database into Development or QA.  PowerShell is your friend here so much of this process can be automated.

Unfortunately, I don’t have any code to share because this was a customer project. But, this is not that hard to reproduce yourself.

We will review the task of moving to the QA environment, but the steps will apply to any other environment as well.


Step 1: QA Environment – SQL Server

The first step is to save any data that is specific to that environment, including:

  • SharePoint configuration
  • Custom configuration data, such as is used by plugins


Step 2: Production Environment

Make or get the latest full backup of the production CRM database.


Step 3: QA Environment – CRM Server

Turn off the following services:

  • Email Router service.
  • Asynchronous Processing Services.
  • Sandbox service.
  • Unzip service

Use Get-Service and Stop-service

Using the CRM Deployment Manager:

  • Disable the QA organization.
  • Delete the QA organization.

Use Disable-CrmOrganization and Remove-CrmOrganization


Step 4: QA Environment – SQL Server

From the SQL Management Studio, perform the following tasks:

  1. Detach QA_MSCRM database.
  2. Move QA_MSCRM.MDF and QA_MSCRM.LDF to a separate file system as backup. This is optional, but I’m a little on the paranoid side.
  3. Delete the QA_MSCRM database.
  4. Restore the Production database backup to QA_MSCRM.

This can be automated using PowerShell using at least two techniques: SMO commands or raw SQL commands, with the latter being the easiest.


Step 5: QA Environment – CRM Server

Using the CRM Deployment Manager, import the QA database.

From the Operating System, perform these tasks:

  1. Run IISRESET.
  2. Turn on Email Router service.
  3. Turn on Sandbox service.
  4. Turn on Unzip service
  5. Turn on Asynchronous Processing Services.

Use Get-Service and Start-service


Step 6: QA Environment – SQL Server

Perform any PHI cleanup to remove or obfuscate sensitive information including:

  • Phone/Fax numbers
  • Email addresses
  • Contact first and last names
  • Address information

I would recommend the SSIS Integration Toolkit for Microsoft Dynamics CRM from KingswaySoft.

You may also wish to review the ALM Toolkit from AdxStudio for additional application life cycle management capabilities.

So that is about it. As you can see, it’s not rocket science, just a bunch of steps.

By the way, one assumption is that the servers are all in the same domain. If your environments are in different domains, you’ll have a bit more work to handle mapping users from one domain to the other, but that is something that is totally doable.

Hi Everyone,

Since I think a lot of people never get around to searching the archives, I thought I’d mention a project I started a while ago to aid the .NET developer in moving your code to the Dynamics CRM 201x version.

The project may be found here:


Project Description
This project is designed to assist the .NET developer who is migrating their C# code from the CRM 4.0 object model to the CRM 2011 object model.

The initial purpose of the project is to generate Visual Studio macros which perform search and replace operations to which change the code from one syntax to the other.

It is planned that in a later stage of the project, we will read and covert source files directly.


This project contains all of the knowledge I accumulated during a couple of CRM 4.0 migrations I performed.

If you have some time, take a look.  If you have some knowledge to share and wish to make additions, then please let me know.

Thanks, Mitch

If you are looking to get started with Dynamics CRM 2013 development, July is the month.  I am proud to announce the arrival of my latest Dynamics CRM developer workshop: Extending Dynamics CRM 2013.



Monday, July 21st through Friday, July 25th.

Class will run between 4 and 6 hours per day, depending on the content.



This is a Internet-based workshop with each student having their own virtual environment for the duration of the course.



Day 1: Introduction to Dynamics CRM Development

The first day we will cover the basics of Dynamics CRM development including:

  • Dynamics CRM Architecture
  • Extensibility points
  • Working with the CRM SDK including:
    • Creating, retrieving, Deleting and Updating data
    • Executing requests
    • Generating early-bound classes using the CrmSvcUtil application


Day 2: CRM Query Strategies

On day two we will be working with the various data retrieval technologies built into the Dynamics CRM SDK.

  • QueryExpression
  • QueryByAttribute
  • FetchXml

Day 3: Plugins and Custom Workflow Activities

Day three will be filled by developing plugins and custom workflow activities.


Day 4: JavaScript

Day four will shift to the client where we will work with:

  • The Dynamics CRM 2013 JavaScript object model
  • The XrmSvcToolkit

Day 5: User Experience Customizations

The final day will be focused on:

  • Editing the SiteMap
  • Editing the Ribbon
  • Working with Solutions           

How Much:

Since this is a new class, the introductory price is $1,695.

Discounts are available for 2 or more students from the same organization.


Note: Due to the hands-on nature of this workshop, the class is limited to 15 students.


Eventbrite - Extending Dynamics CRM 2013

Available via NuGet.

1.1.1 is a bug-fix release. There are few features in Xamarin.Forms 1.1.1 over 1.1.0. As always we welcome all and any bug reports both here or in their own thread.


  • SearchBar.Text is now BindingMode.TwoWay by default
  • iOS VisualElementRenderer can now be subclassed by users
  • Small Layout performance boost

Bug Fixes

  • Android cells text now lays out appropriately, centering when no detail is set.
  • Android EntryCell no longer vertically squished
  • On Android MasterDetailPage.Master now correctly sets icon for back arrow
  • ActionBar now hides correctly on KitKat
  • Images with a UriImageSource inside of a ListView or TableView should no longer crash
  • Performance tweaks for android ViewCells introduced in 1.0.1 and accidentally disabled in 1.1.0 are now re-enabled.
  • CarouselPage's using templated item sources should no longer crash when resetting source
  • AndroidActivity.SetPage now correctly supports being called multiple times to change page contents
  • Fix crash on windows phone with TwoWay binding to ListView.SelectedItem
  • iOS toolbar items now use retina icons properly (no more fuzzy)
  • GroupHeaderTemplates no longer cause binding error spew to console when used
  • Fix binding warning spew when creating listviews from xaml
  • ToolbarItems now inherit their parent pages binding context
  • Setting ToolbarItem.Name in XAML will no longer result in build errors

I still occasionally run into hidden greatness inside of the Dynamics CRM SDK.  Last week I found a great addition to the QueryExpression and QueryByAttribute classes: The TopCount property.

This property was introduced into Dynamics CRM 2011 around the UR10-UR11 timeframe, so if you are on UR11, or later, or have Dynamics CRM 2013, you have this capability.

TopCount works exactly like the TOP operator from a SQL SELECT statement:

SELECT TOP 50 * FROM FilteredAccount


Here is how you use it:

Note: I have a small function called IsTopCountSupportedByServer that checks the version number against UR11 to make sure we can use TopCount.  If not, we drop back to the standard PagingInfo class.

var maxBatchSize = 50;

QueryExpression queryExpression = new QueryExpression(Account.EntityLogicalName);

if (IsTopCountSupportedByServer())
    queryExpression.TopCount = new int?(maxBatchSize);
    queryExpression.PageInfo.Count = maxBatchSize;
    queryExpression.PageInfo.PageNumber = 1;

This is just a really cool addition to our toolboxes and I am shocked I didn’t see this before.

We’ve got a new drop of Xamarin.Forms available.

Read more about it on the Xamarin Forums. Please pay very close attention to the section:

Renderer Porting Guide

Release Notes


**WARNING:** Breaking change to the renderer API in this release.

Major Changes:

  • Renderer API's have been updated to be made more consistent (details below).
  • ModifierType has been removed (unused data type).


Release Features:

  • TableView.Root is marked as content and can now be set implicitly with XAML
  • Android MasterDetailPage now uses true DrawerLayout.
  • XAML now supports OnIdiom for conditional phone/tablet layouts.
  • TapGestureRecognizers now support Commanding and can be used from XAML.
  • Binding now additionally has an empty constructor to allow more usage from XAML.
  • ListView.GroupDisplayBinding and GroupShortNameBinding can now accept a regular string in
  • XAML: `<ListView GroupDisplayBinding="My.Path" />`

Bug Fixes:

  • Entry keyboard updates property on iOS now.
  • NullReferenceException on iOS 6.1 fixed.
  • The Expression-based SetBinding overload's stringFormat parameter now works as expected.
  • SearchBar no longer requires API 16 on Android.
  • Android toolbar now works correctly for ToolbarItems on navigation pages.
  • EntryCell.IsEnabled now works.
  • UriImageSource.Uri no longer throws exceptions when null.
  • Android should no longer use the incorrect context after context recreation events.

Renderer API Changes:

  • Model renamed to Element (and all references updated).
  • Most renderers now subclass from ViewRenderer on all platforms.
  • OnElementPropertyChanged replaces OnModelPropertyChanged.
  • OnElementChanged replaces OnModelSet/OnModelChanged.
  • Windows Phone renderers are now public.
  • Most renderers now subclass generic super-class (no casting needed).
  • Other minor changes (see porting guide on forums).

My Experiences

As mentioned, this package contains breaking changes.  Here is the error list after building my DrawIt sample app post-update:


I got the iOS renderer changed out pretty quick (< 10 minutes), but the Android renderer is causing me issues. Still waiting to hear back from the Forums on this one.

A Note about NuGet Packages


When you first create a Xamarin.Forms project, you may not actually have the NuGet packages installed, which you can do using this command:

Get-Project -All | Install-Package Xamarin.Forms

This will install the Xamarin.Forms package in all of the projects.

The default NuGet Console only works with a single project at a time.  I made the mistake of not recognizing that I was only installed the packages or the update on a single project.

Once NuGet packages are installed in a solution, you have a new option called Manage NuGet Packages for Solution, which will install packages for all or selected projects within the solution.

So Xamarin released an update (v3) last week and it is truly a huge step forward for mobile developers.  So if you are interested in cross-platform development and haven’t reviewed what Xamarin has done, then you need to stop what you’re doing and go look.

Xamarin is having a contest to showcase their new Xamarin.Forms functionality added to Xamarin 3.  I spent the good part of last weekend reviewing everything that I could find regarding Xamarin.Forms and was in my chair coding by 7:00am Monday morning.

This is the story of what I created.


Introducing DrawIt

Imagine a cross-platform drawing tool.  Yeah, I know, they probably exist but I didn’t let that get in my way.  This is a very simple drawing application that allows you to draw with your finger, using a pen color of your choice.

Here is the iOS/iPad version:


The Android version:


The Windows Phone version:


Unfortunately, I was not able to get actual drawing mechanism working on WinPhone, so all we have at this point is the UI.


How it Works

I create a Xamarin.Forms shared-code project which created the following Visual Studio solution:


DrawIt is the shared-code project while the others exist to provide a platform-specific layer that the shared-code will reside upon.

Within the shared-code project, I started off with a custom class that inherited from Image that would allow me to specify a line color.


ImageWithTouch Class

public class ImageWithTouch : Image 
        public static readonly BindableProperty CurrentLineColorProperty = 
            BindableProperty.Create ((ImageWithTouch w) => w.CurrentLineColor, Color.Default);

        public Color CurrentLineColor {
            get {
                return (Color)GetValue (CurrentLineColorProperty);
            set {
                SetValue (CurrentLineColorProperty, value);


Creating the User Interface

The best part of Xamarin.Forms is that I have a single codebase for the user interface, that looks something like this:

public MainPage()
    Content = BuildGrid();

    // Accomodate iPhone status bar.
    Padding = new Thickness(10, Device.OnPlatform(20, 0, 0), 10, 10);

private Grid BuildGrid()
    return new Grid
        VerticalOptions = LayoutOptions.FillAndExpand,
        HorizontalOptions = LayoutOptions.FillAndExpand,
        RowDefinitions = {
            new RowDefinition {
                Height = GridLength.Auto
            new RowDefinition {
                Height = new GridLength (1, GridUnitType.Star)
        ColumnDefinitions = {
            new ColumnDefinition {
                Width = new GridLength (100, GridUnitType.Absolute)
            new ColumnDefinition {
                Width = new GridLength (1, GridUnitType.Star)
        Children =
            {new Label {
                Text = "Draw It",
                Font = Font.BoldSystemFontOfSize (50),
                HorizontalOptions = LayoutOptions.CenterAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand
                }, 0, 2, 0, 1},
            {BuildPalletFrame(), 0, 1},
            {new ContentView {
                Content = BuildDrawingFrame(),
                Padding = new Thickness(10, 0, 0, 0),
                HorizontalOptions = LayoutOptions.FillAndExpand,
                VerticalOptions = LayoutOptions.FillAndExpand
            }, 1, 1}

The UI elements exist within a fixed-size grid that is fitted to the screen for whatever device the application is running on.

All of the code you have seen so far is cross-device compatible and exists within a Shared project used by the device-specific projects


Custom Renderers

In order to provide the low-level drawing capabilities, I had to create what is called a custom-renderer for each of the device platforms. This is what actually creates the drawing surface for each device.  Here is the renderer for iOS:

[assembly: ExportRenderer(typeof(ImageWithTouch), typeof(ImageWithTouchRenderer))]
namespace DrawIt.iOS
    public class ImageWithTouchRenderer : ImageRenderer
        protected override void OnModelSet(VisualElement model)

            SetNativeControl(new DrawView(Control.Frame));

        protected override void OnHandlePropertyChanged(object sender, PropertyChangedEventArgs e)
            base.OnHandlePropertyChanged(sender, e);

            if (e.PropertyName == ImageWithTouch.CurrentLineColorProperty.PropertyName)
                ((DrawView)Control).CurrentLineColor = ((ImageWithTouch)Model).CurrentLineColor.ToUIColor();

The other two projects have similar renderers. The code that actually does the work is in a class called DrawView, which merely creates an ImageView that can be drawn upon using the native drawing mechanisms for the device.


Wrapping It Up

This was a fun little project and I barely touched the surface of what Xamarin.Forms can do.  I am still rather shocked at the small amount of code that I had to write to get a standard user interface across all three platforms.

Drop me a line and let me know what you think.



You can view my source on GitHub here:


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