Category Archives: Administration

System-Wide Alerts in Dynamics CRM 2015

Dynamics CRM 2015 implemented a new system-wide alerts to inform you of issues with things like the Server-side Sync process. They appear in the user interface as a yellow bar at the top of the page, as you can see below:


Clicking the View Alerts button will take you to the Alerts view where you may review the individual alerts.

At this point I am not certain what will be alerted on, besides issues with Server-Side Sync, but those for sure are there.

Viewing Alerts

The actual Alerts view is on the Dynamics CRM user interface at the end of the Sales Area:


The rather fascinating thing about Alerts, is that they are not actually Alerts, they are Traces.  So, when you are working with Advanced Find, you need to use the Traces entity.


Programmatic Access and Automation

The Traces (Alerts) entity is actually called TraceLog, which is the entity name to use when writing code using the Dynamics CRM SDK.

Traces are fairly locked-down so here are some of things you can do with the entity:

  • Create a workflow to trigger on the Traces entity
  • Perform a query using Advanced Find
  • In the SDK TraceLog is listed a “internal use only” but it appears you may use the SDK to perform standard CRUD operations.  NOTE: I have not tested this.


Privileges for the Traces entity are found on the Core Records tab:


It would appear that everyone can Create, Read, and Append Trace records, but only the System Administrator role can delete them.  Since these are standard security roles, you should be able to change these settings if you wish.


Traces are a very interesting addition to the Dynamics CRM platform and I need to get more information from Microsoft as to its intended use and if we as developers can actually create alerts that may be seen by the System Administrator.

That will be my next step, when I have time.

Explorer! v3.5 for Dynamics CRM Released

A new version of Explorer! for Dynamics CRM: My answer to a better understanding of your CRM data, the way the data is presented to users, and how it is stored within your database.

Version 3.5 adds improved compatibility with Dynamics CRM 2013 and 2015.

Visit the product page for more information about how Explorer! for Dynamics CRM can help you manage your Dynamics CRM data.

Monitor Queue Routing Rule Workflows

We ran into a fascinating issue when creating Routing Rule recently.

Here is the rule:


This is fairly straightforward, but for some reason, we had an issue where the rule was not firing as we expected.

I turns out that behinds the scenes, CRM actually creates a workflow to handle the magic required to route the email.

Normally, you never really see these workflows run because they have the flag set to delete the history if the workflow was successful

But unfortunately, in our case, something was not configured correctly in this workflow and it was failing:


We modified the rule slightly and everything seemed to work fine after that. (I wasn’t the one doing the modification so I an not exactly sure what was changed.

Anyway, the moral of the story is that if you ever see strange workflows, that you did not create, failing, see if they are Routing Rules.

Registration for Extending Dynamics CRM 2013 Ends Thursday

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.


Refreshing your development or QA environment with production data

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.

Correcting Email Router issues after transitioning CRM Online to Office 365

I had one of my CRM Online organizations transition to the O365 platform a couple of weekends ago.  Not exactly a smooth process.  One of the issues I ran into was my email router was not running due to configuration changes.  Here is a list of things I worked through.  Hopefully this will help some other folks.


CRM Online URL

The URL that you utilize for CRM Online with Office 365 is different than that of CRM Online with Windows Live authentication.  The new format looks like this:[organization name]

[organization name] is the name of your CRM Online organization as seen on the Developer Resources page (Settings, Customizations, Developer Resources).


Unable to Publish Configuration

Is everyone familiar with the Chicken or the Egg conundrum?  Well I ran into that here.  I could not publish the configuration from the Email Router Configuration application because the Email Router Service was not running.


Email Router Service Will Not Start

The email router would not start because it could not find the Microsoft.Crm.Tools.EmailAgent.xml file, which is created by publishing the configuration.


The only way I successfully got around these issues was to perform a Repair on the CRM Email Router installation and that returned the system to normal.  The email router start successfully and I was able to publish my new configuration.


Other Issues

I did not, but you may also run into this issue:

The Email Router and Microsoft.Crm.Tools.EmailAgent.SystemState.xml file


Good luck. 


Dynamics CRM, PowerShell, and Async Operations

Have you used the Dynamics CRM PowerShell commandlets to automate any of your deployment tasks? 

If not, then you should.  There is good stuff in there.

In the CRM SDK sample code folder, you will find a folder called ps, which is where the PowerShell samples are located.

Many of the Deployment operations have an asynchronous component so that you can “fire and forget” your operation, should you wish.

However, there are built-in facilities for monitoring the asynchronous process that was created:

$opstatus = Get-CrmOperationStatus -OperationId $opid
while($opstatus.State -eq "Processing")
        Write-Host [(Get-Date)] Processing…
        Start-Sleep -s 30
        $opstatus = Get-CrmOperationStatus -OperationId $opid

The while loop will continue to execute until the status changes away from Processing.

BUT, and there is always a but, there is another status that you might encounter that needs to be addressed:

while($opstatus.State -eq "Processing" -or $opstatus.State -eq "Queued")

The Queued status will appear if the Deployment service has other processes that it is attempting to complete.  Modifying the while loop will allow your code to wait for either.

SnapShot! 3.2 Released

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