CRM 4.0: errorcodes and Troubleshooting
A big part of my work is in the Incident management field. One of the products I work a lot with is Microsoft Dynamics CRM 4.0. The objective of this post is to give some quick tips and pointers on how to troubleshoot those incidents.
Security Roles
First thing is the ability of reproduction on the CRM environment. Does the same user have the issue in a certain situation. The user context plays a big role in that. From which business unit is the user part of. And what kind of security roles and the access levels on the different privileges always does he or she have? The Microsoft Dynamics CRM 4.0 priviliges by entity Technet article is a good resource.
Tracing
If I can reproduce the incident my next step is always taking a peak in tracing. Of course you should have tracing enabled at that point, in Microsoft knowledge base article 907490 you can find an explanation on how to enable it.
Error codes
There are lots of Error codes, 1359 to be exactly. A complete Microsoft Dynamics CRM 4.0 Error code list can be found on MSDN. You can also download it as an worksheet in the Most common error code I have seen so far was the 0x80040220 – PrivilegeDenied – The user does not hold the necessary privileges. The user doesn’t have the right access level to complete the the operation. The only problem with Microsoft Dynamics CRM 4.0 is that they write it like that in the log.
Crm Exception: Message: SecLib::CrmCheckPrivilege failed. Returned hr = -2147220960 on UserId: 2c3519fc-f322-df11-ada7-00155d961205 and PrivilegeId: 2DDDED47-7488-4039-B9FF-81DEFE81FDD3, ErrorCode: –2147220960
You notice three things in the exception:
User: 2c3519fc-f322-df11-ada7-00155d961205
PrivilegeId: 2DDDED47-7488-4039-B9FF-81DEFE81FDD3
ErrorCode: –2147220960
To figure out which user you are looking at in the error is easy. The user name is easy to get from the interface. Log on as and system administrator on your Microsoft Dynamics CRM 4.0 installation. Navigate to Settings > Administration > Users. Open a random user record, a dialog will open. Press F11, you will see a following kind of url: https://url/OrganizationName/biz/users/edit.aspx?id={RandomUserGuid}. Replace the RandomUserGuid with the GUID from the Crm Exception.
PrivilegeId can be a little bit more tricky. It depends if the privilege is from a custom entity or a standard entity. Standard entities can be found in the earlier mentioned Microsoft Dynamics CRM 4.0 priviliges by entity article on Technet. But if you don’t like clicking through you can use a free tool like Find Privilege from Mitch Milam.
For the conversion of the Error Code you can use the calculator on your desktop. Follow the instruction of David Jennaway in his CRM Error Codes blogpost. In the Software Development Kit you also have a Crmhelpers folder which contains the error codes, you can download the latest Microsoft Dynamics CRM 4.0 Software Development Kit on Microsoft Download Center.
Hopefully this will give you some inside on Microsoft Dynamics CRM 4.0 incident troubleshooting. In next version CRM 2011 they have made it a bit more administrator friendly, so more on that to come!