web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    RE: Adding hierarchy to Cases causes error on case views

    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
    RE: Adding hierarchy to Cases causes error on case views

    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
    RE: Adding hierarchy to Cases causes error on case views

    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
    RE: Adding hierarchy to Cases causes error on case views

    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
    RE: Adding hierarchy to Cases causes error on case views

    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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans