by Gustaf Westerlund | Jun 16, 2011
Today I was deploying a solution to a production environment and ran into a quite difficult problem; the custom report we had made could not be uploaded to CRM and the error description was rather cryptic. This error description was independent on if we tried to import the entire solution or just added the report directly. The error we received was the following:
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]:
An error occurred while trying to add the report to Microsoft Dynamics CRM. Try adding the report again. If this problem persists, contact your system administrator.Detail:
http://www.w3.org/2001/XMLSchema-instance” xmlns=”http://schemas.microsoft.com/xrm/2011/Contracts“>
-2147188072
http://schemas.datacontract.org/2004/07/System.Collections.Generic” />
An error occurred while trying to add the report to Microsoft Dynamics CRM. Try adding the report again. If this problem persists, contact your system administrator.
2011-06-16T07:43:12.1856313Z
I Binged/Googled the webb some and found that this article probably describes this error as it fits our environmen setup:
http://support.microsoft.com/kb/2491352
The error was due to the fact that reports written for SQL 2008 R2 are not compatible with SQL 2008. This has some very important effects as many customers might be running SQL 2008 for the production environments and many developers work with SQL 2008 R2 when developing. This difference might not be noticeable in general but this fact will cause these reports to not be importable into the production environment.
So, a general suggestion is to have all environments, development, development test, acceptance test, training and production on exactly the same version of both Windows server and SQL-server to avoid any errors showing up in one of the environments but not the other, something that can be very problematic to solve due to the difficulty of finding the error since it by definition cannot be replicated on some of the environments.
Gustaf Westerlund
CEO, Chief Architect and co-Founder at CRM-konsulterna AB
www.crmkonsulterna.se
by Gustaf Westerlund | Jun 1, 2011
The workflow activities framework for CRM 2011 has been upgraded from CRM 4.0. The dependance properties have been removed and it now support the simplified datatypes used in CRM 2011 like DateTime.
I was developing a custom activity today and I had an output argument that was of the type EntityReference. However, when I tried to run it I got a weird error:
“The argument of type ‘Microsoft.Xrm.Sdk.EntityReference’ cannot be used. Make sure that it is declared on an activity.”
The argument declaration looked like this:
[Output(“The Output of special entity”)]
[ReferenceTarget(“new_specialentity”)]
public OutArgument specOut { get; set; }
And I am trying to set it with the following code:
specOut = new OutArgument();
Entity outent = entities.Entities[0];
specOut.Set(executionContext, outent.ToEntityReference());
I had also tried creating the entity reference with a default contstructor and filling id and logicalname, with the constructor setting id and logicalname. I had even tried setting it using the entity directly but they all give the same error. I had not found anything useful on the internet or in the SDK.
After some rethinking I looked closer at the error message and thought that there might be something wrong with the declaration or definition of the OutArgument. And after some tries I found that the error was that I had created a new OutArgument which is wrong, it is precreated and this was the reason for the error. Hence I just removed the line:
specOut = new OutArgument();
and it work like it should have from the beginning.
It is always interesting to work with new technology!
Gustaf Westerlund
CEO, Chief Architect and co-Founder at CRM-konsulterna AB
www.crmkonsulterna.se
by Gustaf Westerlund | May 12, 2011
Sometimes when installing, it can be necessary to allow the installation to take place despite the fact that some of the system checks that are conducted during the installation fail. There are some different places mentioning how to do this, it is actually rather simple, you just have to add the DWORD key IgnoreChecks with a value of “1” to the MSCRM key in the registry [HKEY_LOCAL_MACHINESOFTWAREMicrosoftMSCRM].
Gustaf Westerlund
CEO, Chief Architect and co-Founder at CRM-konsulterna AB
www.crmkonsulterna.se
by Gustaf Westerlund | May 12, 2011
I was going to deploy some plugins to a server today and when I tried to connect to the CRM with the PlugingRegistration.exe I found got the following error:
Unhandled Exception: System.ServiceModel.FaultException: The server was unable to process the request due to an internal error.
So I switched on the tracing in CRM and read the following from the trace log (edited):
System.IO.FileNotFoundException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Could not load file or assembly ‘Microsoft.Xrm.Client, Version=5.0.2.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ or one of its dependencies. The system cannot find the file specified.
The error seems to originate from CRM not being able to find the Microsoft.Xrm.Client.dll file. After some fiddeling, I fixed it by copying the file from the SDKbin directory to CRMWebbin directory. It is a bit strange that it is required that you do this, and it will probably be fixed in future rollups of CRM 2011.
By the way, I heard some rumors from the CRM Statement of Direction that CRM 6 will be released Q2 2012 and that it will have multibrowser support. The feature we have all been waiting for, and it is probably going to be more or less the same thing as the 2011 version but with multibrowser support. So Software Assurance will probably be a good idea this year for Microsoft Dynamics CRM.
Gustaf Westerlund
CEO, Chief Architect and co-Founder at CRM-konsulterna AB
www.crmkonsulterna.se
by Gustaf Westerlund | May 10, 2011
Since I live by the principle that you should focus on what you are good at and leave the rest to others, I must admit that my SharePoint experience is degrading due to the fact that I havn’t worked with it for several years. This can also be seen in the postings that I have done on the blog, where almost 100% of the posting during the last years have regarded Dynamics CRM.
The natural conclusion of this is that this blog should also focus, hence I have renamed it to Gustaf’s Microsoft Dynamics CRM Blog omitting the previous SharePoint part.
I also revised the layout of the blog, to freshen things up a bit.
Gustaf Westerlund
CEO, Chief Architect and co-Founder at CRM-konsulterna AB
www.crmkonsulterna.se
Recent Comments