I went to publish a blog article this morning and received an access denied messaged. Hmm, that is strange, it worked the last time and I haven’t made any changes.
After opening a support case, and conversing back and forth for a bit, I happened to look down at my tool tray. Here is my response to the support folks regarding my issue:
I think I’m going back to bed – not sure I am qualified to be awake at this point in the day…
This week I was working with a customer who was using CRM 4.0 and had a fairly advanced set of customizations dating all the way back to CRM 3.0.
I wanted to do some prototyping on an idea I had so I created a second Organization on the development server with the idea of exporting customizations from the main development organization into the new test organization. That was the plan anyway, but it didn’t work out like that.
Here is one of the errors I received when performing the import:
Failure: opportunity: The custom message must contain the same number of substitution parameters as the system message. Enter a message with the correct number of substitution parameters.
Wow, that’s nice. Now since I am a developer, I’m pretty sure I know what it’s talking about, and sure enough, I think I found the culprit:
Notice that the Default Display String has ‘{0}’ in it? That’s the “substitutable parameter.� Notice that the Custom Display String doesn’t have it?
Â
What is a Substitutable Parameter?
Within the .NET programming language C#, you have the ability to leave a “placeholderâ€? or “substitutable parameterâ€? inside of a string. You later replace that parameter with a real value using the method String.Format. The parameters start with zero (0) and increase in numeric value from there.Â
So, the command:
String.Format(“this is a {0}.�, “test�);
would produce the result:
this is a test.
Â
So what went wrong?
Well, there are actually two issues:
- The developer who created this customization didn’t make the Custom Display String function exactly the same the Default Display String. This would have possibly caused an error at some point in the future.
- It appears that the upgrade process from CRM 3.0 to 4.0 did not perform any such checks while the import process does. This is why the import of the Opportunity Entity failed.
Â
How do you fix it?
There are two ways:
- Delete the customized message string.
- Correct the issue with the substitutable parameter not existing in the custom message string.
Â
Conclusion
Unfortunately, it is quite common to see small issues like this when attempting to move an upgraded CRM system to a fresh install. There are many issues corrected by hotfixes and added the the various hotfix rollups, but other issues will require you correct the problem manually.




