Armanino Blog
Article

Dynamics CRM Workflow Fires Twice Fix

October 20, 2015
"

The Armanino Microsoft CRM team's best practices dictate multiple environments for any Microsoft CRM deployment (at a minimum, DEVelopment and PRODuction, but preferably also a third TEST environment). When customizations and CRM configurations pass muster in the DEV environment, they are then copied/moved via [generally Unmanaged] Solutions to the TEST or PROD environment.

Recently, I encountered a strange problem. After making extensive changes to a Dynamics CRM workflow process already present in DEV and TEST, I put the revised version in an Unmanaged Solution and moved it to TEST for end user review. Shortly thereafter, end users began noticing that the workflow was firing twice.

This can indeed be the case if a workflow process is configured to fire when a record is created or when a record is edited, as shown in the following image:

Options for Automatic Processes

It can also occur if a plugin is firing as a result of the workflow, thus causing the specified field(s) to change a second time.

However, in my situation none of those applied. The workflow was configured to fire only when one specific field was edited in an existing record, and there was no corresponding plugin reacting.

First, as a sanity check I deactivated the workflow. As expected, it went from firing twice to not firing at all.

Next, I decided to delete the workflow entirely from the TEST environment. If this had been the only place where it existed, I might not have taken this approach, but I knew that it still existed in the DEV environment. I then moved it (again) from DEV to TEST, and was relieved to discover that this solved the problem!

Although I do not know the specifics, I suspect that, during the initial move from DEV to TEST, the Dynamics CRM workflow was inadvertently added to the SQL Server database a second time. This should not be possible, but in the world of Dynamics CRM, apparently anything is possible.

Though not an ideal solution, if you are experiencing a similar issue, this method should help remedy the problem!

Learn more about Microsoft CRM and the team of Dynamics CRM consultants at Armanino.

Stay In Touch

Sign up to stay up-to-date with the latest accounting regulations, best practices, industry news and technology insights to run your business.

Resources
Related News & Insights
Overview of Sage Intacct R1 Release
Webinar
Insights on the Biggest Changes in Sage Intacct’s 2024 R1 Release

May 15, 2024 | 01:00 PM - 02:00 PM PT
Fireside Chat: Access to Top-Tier Talent Through Outsourcing
Webinar
The Crucial Role of Internal Communications in Driving Engagement

April 30, 2024 | 10:00 AM - 11:00 AM PT
5 Signs Your Business Has Outgrown its Legacy Accounting System
Webinar
Don't Let Your Legacy System Limit Your Potential

April 24, 2024 | 10:00 AM - 10:45 AM PT