header image

Error opening entity records

Posted by: pgernburd | November 29, 2011 | 1 Comment |

I recently had the opportunity to work on an issue that would present itself as possible bad data, or an invalid attribute in a column view when browsing entity records.  In my case, it was browsing the e-mail template records.  However, I suspect this issue could turn its head on other entity record types as well.

When browsing to the e-mail templates, I was presented with this friendly error:

An error has occurred.

Try this action again.  If the problem continues, check the Microsoft Dynamics CRM Community for solutions or contact your organization’s Microsoft Dynamics CRM Administrator.  Finally, you can contact Microsoft Support.

image

Turning on the server platform trace revealed the following:

System.NullReferenceException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #67EE19C8: System.NullReferenceException: Object reference not set to an instance of an object.

   at Microsoft.Crm.Sdk.Query.ConditionExpression..ctor(String attributeName, ConditionOperator conditionOperator, Array values)

   at Microsoft.Crm.ApplicationQuery.RetrieveEmailTemplateByObjectCommand.DecorateQuery()

I noticed that on the e-mail templates entity view, there were 2 default views.  Several CRM 4.0 users might recall this not-to-uncommon issue. 

image

However, I could not set one specific view to be the true default. 

To correct the problem, I manually modified customizations.xml.  As always, take a backup before making any direct modifications.

1) Create a new solution and add the email templates entity (EmailTemplatesSolution)
2) Export EmailTemplatesSolution and open customizations.xml
3) Find the XML section that refers to the savedqueryview that you do not want set as default (remember, we only want one default view).  Set it’s<isdefault> parameter to 0, as shown below.

image

4) Re-add the update customizations.xml file into the solution, re-import, and publish. 

You should hopefully be able to browse your entity records. 

under: Customization and Configuration
Tags: , , , , , ,

Responses -

Yes.. that works. Thanks a lot for this post.

Leave a response -

Your response:

Spam Protection by WP-SpamFree

Categories