web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Adding hierarchy to Cases causes error on case views

(0) ShareShare
ReportReport
Posted on by

We are trying to implement the 2015 hierarchies feature in the case entity.  We are successful in setting up the hierarchy and everything appears to be working.  However, when some views (both system and custom) are loaded when you go to the case entity section, we receive a generic error - "an error has occurred." 

The error only occurs on some views and only occurs when the view is initially loaded.  For example, I can go to the case entity which loads View A by default and there is no error.  I can switch the view to View B and there is no error.  However if I click on Case in the command bar to reload that screen, it attempts to show View B and returns an error.  View A never returns an error and View B always returns an error when the screen reloads.

The views that return an error are a mix of system and custom views.  If I take out the Hierarchy Setting and change the 1:N relationship back to Hierarchical=No, then the errors do not occur.  Has anyone else encountered this?

The trace file doesn't provide us much more -


Error: Exception of type 'System.Web.HttpUnhandledException' was thrown.

Error Message: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Error Details: Exception of type 'System.Web.HttpUnhandledException' was thrown.

Source File: Not available

Line Number: Not available

Request URL: http://crmtestapp/BondCRM/_root/homepage.aspx?etc=112&layout=0&pagemode=iframe&sitemappath=CS%7cCS%7cnav_cases&viewid=%7b00000000-0000-0000-00AA-000010001028%7d&viewtype=1039&visualizationId=&visualizationPaneMode=0&visualizationType=0

Stack Trace Info: [NullReferenceException: Object reference not set to an instance of an object.]
   at Microsoft.Crm.Service.Application.Controls.CasesGridDataProvider.GetData(QueryBuilder queryBuilder)

*This post is locked for comments

I have the same question (0)
  • mscrmba Profile Picture
    on at

    Is it a data issue (e.g. background hierarchy fields may not set for those records)?  (Not sure what the reason would be - but at least we may be able to start to track it down.)

    Have you tried it with new records?  Does it always work for them?

  • Community Member Profile Picture
    on at

    Thanks for responding!  That's a good suggestion, but I don't think it is data related.  I have views that work and views that don't work where there are zero records returned in the view.  I tried creating a new view and it did not work.

  • Ilkka Priha Profile Picture
    30 on at

    We have the same problem. However, the hierarchy seems to work within a fresh CRM organization and fail in one imported from CRM 2011. The imported one has some other customization for incidents, too.

    InnerException:
    Error Type: System.NullReferenceException
    Error Message: Object reference not set to an instance of an object
    Error Stack Trace:
        at CasesGridDataProvider.GetData(QueryBuilder queryBuilder)  ilOffset = 0x60
        at GridDataProviderQueryBuilder.LoadQueryData()  ilOffset = 0x12F
        at GridDataProviderQueryBuilder.LoadData()  ilOffset = 0x0
        at GridDataProviderBase.PrepareGridData()  ilOffset = 0x6
        at GridDataProviderBase.PrepareData()  ilOffset = 0xE1

    All views work when executed from the Advanced Find dialog or from some related entity, but from the main window some work but most not.

    For us, its enough to remove the corresponding Hierarchy Setting from the Incident entity to make the error to disappear, no need to set the Hierarchical option in the relationship to No.

  • Ilkka Priha Profile Picture
    30 on at

    OK, we found a workaround by defining one of the working views as the default, then we can change the view to any other one, too, and they all work.

  • Community Member Profile Picture
    on at

    Unfortunately for us, this workaround doesn't always work.  When we set a working view as a default, the other view works if I switch to it right away.  However, if there is a screen refresh and it tries to load one of the broken views, we get the error even though the broken view worked just a moment before.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans