Microsoft Dynamics CRM Workflow - Take Care When Linking Tables

I was creating a Workflow for a client in Microsoft Dynamics CRM 2011. It was a simple process; when an Opportunity field was updated (in this case, Rating was set to HOT), the client wanted the related Account record to automatically have its Status field updated.

On my first pass the Process Properties looked like this:

I selected Account from the Related Items list as shown above.

After Saving and Activating the Workflow I went to an Opportunity record, updated the Rating field to HOT and clicked Save. I then clicked Workflows in the left Navigation Pane of the Opportunity and found the process was stuck with a Status Reason of Waiting, as shown below.

I opened the Workflow item and saw an error message, “A record required by this process could not be found.” as shown below.

I researched the error message and found several posts related to the Aysnc service being turned off, or a required record having been deleted. Async was running, and the Opportunity and associated Account records had not been deleted. An associate suggested looking at the options in the Process Properties for the Related Items. This reminded me of the complex table structure of Microsoft Dynamics CRM 2011 and the various ways that an Entity can be listed, for example, when creating Advanced Finds and joining tables together via the Related function.
Sure enough, when I reviewed the options for the related Account I found that, by scrolling down in the list there was an option for Potential Customer (Account). Of course! If I had thought it through (and looked at all the Related Items options), I would have seen, and noted, that the Account linked to an Opportunity appears in a field labeled Potential Customer.

Once I reset the Related Item to Potential Customer (Account), as shown below, I ran the Workflow again.

This time, when I viewed the Workflow page on the Opportunity, the process once stuck as Waiting was now joined by a successful one, as shown below.

Microsoft Dynamics CRM has the powerful ability to associate various Entities to perform useful tasks or create informative reports. It’s crucial, however, to link the proper Entity. When in doubt, pick one and try the Workflow (or Advanced Find or Mail Merge…). If you don’t get a successful result, try another variation of the Entity.

Thanks to Scott Weiss, Core Solutions President, for putting me on the right path.

If you'd like to discuss any of the concepts referred to in this article, send us an email.

Submitted by Mike DeLisa, Project Manager at Core Solutions.

Show Buttons
Hide Buttons