Dynamics CRM Upgrade Blocker: Orphan Plugin Step Image records

Last week I was working with another Microsoft partner who was upgrading a customer’s Dynamics CRM from 2011 to 2015 when they ran into the following error moving to Dynamics CRM 2013 (which you must do, to get to 2015):

image

Note: SdkMessageProcessingStep is the internal name for a plugin step, as configured using the Plugin Registration Tool.

So we ran the following script to see if we could not locate the offending SDK Message Processing Step.

SELECT 
 SdkMessageIdName,
 Name,
 EventHandlerName,
 SdkMessageProcessingStepId
FROM
 SdkMessageProcessingStep
WHERE
 SdkMessageProcessingStepId = 'd987ac98-8b85-dd11-b48e-001143ec27a2'

And we got nothing.

This is very strange so I started looking around for anything else that could cause such and error – and I actually found it.

Root Cause

The issue was actually on a separate tabled called: SdkMessageProcessingStepImage, which stores the Pre or Post Image configuration for a specific plugin step.

This CRM system was originally v4.0 and somewhere in the upgrade to CRM 2011 a plugin step was removed from the system and the Plugin Registration Tool did not remove the associated Plugin Step Image, so these records remained in the database, unused and unnoticed until the upgrade process tried to modify them.

The actual error message is displayed because the SdkMessageProcessingStepImage is referencing the SdkMessageProcessingStep, which doesn’t exist-just like the error says.

Correcting the Issue

To verify this is indeed the problem, we ran this script:

SELECT 
  *
FROM
  SdkMessageProcessingStepImage 

WHERE
 SdkMessageProcessingStepId = 'd987ac98-8b85-dd11-b48e-001143ec27a2'

This will produce records if you actually have orphan Plugin Step Images.

Your next step is to remove those records from the database using a SQL command.  Kind of scary, but they are not being used anyway.

Conclusion

I have seen this type of error message a number of times so it does happen occasionally, but not all that frequently.  My theory is that a specific version of the Plugin Registration Tool, probably for CRM 4.0, was responsible for this issue and it was correctly in later versions of the tool.

I think that I need to add this as an upgrade check to my SnapShot! documentation tool.

Manually Repairing a Sitemap. Part 1

As I mentioned a couple of week ago, my upgrade from CRM 2013 to CRM 2015 did not go well. One of the issues is my SiteMap was totally broken and I had to replace it with the “default.”

The only problem was I wiped out the custom entries for my marketing package, Click Dimensions.

No problem, I thought, I’ll just add the solution back.  Except that did not work.  I ran into ghost SiteMap entries from a previously remove solution. This required a call to Microsoft Support to get them corrected.

Once corrected, I was successfully able to import the solution.  Except there were no custom SiteMap entries.

Only only solution in this case is to manually add them, which involves this process:

The Process

1. Create a new solution.

2. Add the SiteMap to the solution.

3. Export the solution as unmanaged.

4. Unzip the solution files.

5. Take the solution file from the package you are attempting to import and unzip it as well.

6. Open the customization.xml file from step 4 in an editor like Visual Studio or Notepad++.

7. Open the customization.xml file from step 5 in an editor like Visual Studio or Notepad++.

8. Copy the information from the step 7 SiteMap and paste it into the proper location within the step 6 SiteMap.

9. You will need to remove some XML attributes that are specific to the Solution Import process. Here is an example:

<Group Id="Extensions" ResourceId="Group_Extensions" ordinalvalue="5" solutionaction="Added" />

You need to remove the any reference to ordianvalue and solutionaction.

10. Save the step 6 customization.xml file.

11. Re-Zip the files from step 4.

12. Import the solution back into CRM.

13. Refresh your browser and see if the SiteMap changes worked.

Things to Know

I did not get into great detail about the SiteMap itself because you really have to understand how it is organized and all of the components that are involved. If you do not understand these things, you can damage the SiteMap and render your CRM system inaccessible.

Before you start anything like this, please know and understand what you are doing.  See the references below.

If all else fails, open a case with Microsoft.

References

Edit the site map

SiteMap XML reference

SnapShot! 3.7 for Dynamics CRM is Available

My Dynamics CRM documentation tool, SnapShot!, version 3.7 is now available.

This version includes the following enhancements and corrections:

  • Compatibility with Dynamics CRM 2015 Online Update 1
  • The Entity and Field reports now have the GUID for each which I have found very useful when troubleshooting solution import issues.
  • Organizations with a large amount of customization are now better handled and will not encounter issues when exporting entities with large numbers of fields.
  • Issues encountered (randomly) when working with Dynamics CRM organizations that where previously created using Dynamics CRM 4.0 or before, have been corrected.

Visit the SnapShot! product page for more information.

July Webinar: Becoming a Dynamics CRM Technical Architect

Hi Everyone,

On Wednesday, July 1st, I’ll be holding a free webinar to discuss the requirements for a person to make the move from being a Dynamics CRM user, administrator, or developer, into becoming an architect of Dynamics CRM business solutions.

What to expect

In this webinar we will be discussing the basic technical areas of expertise and skillsets that must be developed on your path to becoming an architect.  In part, if not in full.

We will also be reviewing several CRM-related design scenarios which will highlight the types of things you need to consider when developing solutions for Dynamics CRM.

At minimum, I would expect you to come out of the webinar with at least a basic understanding of the types of questions that must be asked when designing Dynamics CRM-related solutions.

What I can use your help with

Feedback during the webinar will, of course, be accepted.  In addition, I will send out a survey afterwards to help gather additional data points.

Who should attend?

Anyone who would like to further their knowledge related to solving business problems using Microsoft Dynamics CRM.

Requirements

You must have working knowledge of Microsoft Dynamics CRM 4.0, 2011, 2013, or 2015. This is neither an Introduction to Microsoft Dynamics CRM or a development class, but you do need to know the capabilities of the product.

Sessions

I am actually holding three sessions to accommodate attendees from around the world:

Session 1: UTC+1

Wed, Jul 1, 2015 8:00 AM – 9:30 AM CDT       Register Now

Session 2: UTC-5

Wed, Jul 1, 2015 1:00 PM – 2:30 PM CDT     Register Now

Session 3: UTC+10

Wed, Jul 1, 2015 7:00 PM – 8:30 PM CDT      Register Now

(this translates to 10:00am, Thursday, July 2nd, in Sydney, AU)

Please let me know if you have any questions.

Thanks, Mitch

Free Dynamics CRM Webinars in June

Hi Everyone,

In June we will be conducting the following free webinars:

Dynamics CRM Portable Business Logic

Learn the basics of configuring Portable Business Logic as an alternative to writing JavaScript.

Tue, Jun 9, 2015 11:00 AM – 12:00 PM CDT (GMT –5:00)      Register Now

Dynamics CRM Team development best practices

In this webinar we will be discussing best practices when working in a team development environment.

Tue, Jun 23, 2015 11:00 AM – 12:00 PM CDT      Register Now

 

Again, if you have any suggestions, then please visit my Google Moderator Site (good through the end of June), and up-vote or add your own topic or suggestion.

Thanks, Mitch

Announcing my Mentoring Program

Hi Everyone,

I decided to formalize my mentoring program to hopefully open the door to more organizations. This is a process that I conduct for customers on a fairly regular basis which fills a niche and a requirement when you need assistance, but do not have the need or budget for a full-blown consulting engagement.

Overview

I often run into customers who need additional help with either an architectural issue or a project they are working on. Many times, they do not have a need for a full-blown consulting engagement, but need to have access to someone they can bounce ideas off of when they hit a roadblock or a fork-in-the-road and need help with an architectural decision.

How it Works

When you sign up for our Mentoring Program, you are actually purchasing five hours of advisory services at a discounted rate.

We typically work out a schedule of conference calls or screen-shares in blocks of 30 or 60 minutes, depending on your requirements. This can be weekly calls, bi-weekly,or as required.

Typical Scenarios

Here are a few scenarios that I have done in the past:

  • Architecture design questions
  • Skills development roadmap
  • Training program design
  • "What-if" scenarios
  • Code-reviews

For More Information

To sign-up visit our Mentoring Program page.

 

Thanks, Mitch

Don’t forget: June 1st: Turn your .NET developer into a Dynamics CRM Developer

Hi Everyone,

I just wanted to remind you that my Dynamics CRM Developer course is coming up on June 1st, so if you have any of your .NET developers that you want to get training on Dynamics CRM development best practices, then now is the time to register.

Course Description

If you are looking to get started with Dynamics CRM development, and are looking for an instructor-led, hands-on workshop, then let me introduce you to Extending Dynamics CRM. In case you did not know, Microsoft decided to only offer the Extending Dynamics CRM course via eLearning, starting with Dynamics CRM 2013 eLearning, which is a self–study program, is great for many people, but I think students gain a tremendous amount of learning and understanding from having an instructor who works with Dynamics CRM development on a daily basis. This student-instructor interaction combined with the ability for the student to ask questions and obtain clarifications, makes this course all the more valuable.

Who:

This class is taught by Mitch Milam, nine–time Microsoft Most Valuable Professional for Dynamics CRM and an independent consultant specializing in Dynamics CRM architecture, development, and training.

What:

We have taken the topics normally covered by the official Microsoft Extending Dynamics course, and expanded their depth quite substantially. Instead of a three–day course, this is a five–day course with most of the extra content being the addition of a large number of hands–on labs. The information covered is relevant to both Dynamics CRM 2013 and 2015.

When:

Monday, June 1st through Friday, June 5th. Class starts at 8:00am CST and will last five or six hours per day, depending on the topic. Please budget the entire day so that you have time to complete the homework assignments.

Where:

This is an Internet-based workshop. Classroom time and discussions will be facilitated using GotoMeeting. Each student will be given their own virtual development environment for the duration of the course. This will allow for the completion of labs and homework without causing conflicts with the other students.

How Much:

$1,995 per student (discounts are available for more than one student).

 Eventbrite - Extending Dynamics CRM (June)  

Need More Information?

If you would like to get more information on this class, then please visit the training overview page: http://www.infinite-x.net/dynamics-crm-training/extending-dynamics-crm

Sharing information and lessons learned with other developers

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