Sdílet prostřednictvím


Incident (case) hierarchies

 

Applies To: Dynamics CRM 2015

Incident entities can be related hierarchically. An administrator can use the Parent and Child case settings to configure specific behaviors for these relationships.

Within the application, people can create a new child incident or associate an existing incident to a parent incident. This association uses the incident_parent_incident relationship. When you create a new incident to be associated using this relationship, use the InitializeFromRequest message to initialize the new incident with the default values defined in the attribute mapping for this relationship. The Parent and Child case settings allow easy access to specify the attribute mappings to this relationship, but they may also be set by editing the relationship in the application or programmatically. More information:  TechNet: Create and edit entity relationships and Customize entity and attribute mappings.

The following behaviors are enforced for incident hierarchies:

  • Only one level of hierarchy is supported. You can’t set an incident as a parent while it is a child of another incident.

    • If you try to associate a child incident for an incident that is already the child of another incident you will get error -2147224493 with the message: “You can't create child cases for child cases.”

    • If you try to associate an incident that is a parent incident as a child of another incident you will get error -2147224491 with the message: “You can't add a parent case as a child case.”

  • Each incident can have up to 100 child incidents. If you try to create too many child incidents you will get error -2147224492 with the message: “A Parent Case cannot have more than 100 child cases. Contact your administrator for more details.”

  • Incidents associated with different parent incidents cannot be merged. The error message is “You can’t merge cases that have different parent cases.”

Rules for deactivating cases

The Parent and Child case settings in the application also allow you to configure additional cascade closure preferences. Depending on how the hierarchies are configured for the organization, specific rules around deactivating incidents should be followed to align with the preferences of the organization. When an incident is deactivated, its state is set to either resolved or canceled.

When Parent and Child case settings are configured in the application, data is stored in the following Boolean attributes of the organization entity.

Attribute

UI Label

CascadeStatusUpdate

Close all child cases when parent case is closed

RestrictStatusUpdate

Don’t allow parent case closure until all child cases are closed

Based on the values of these attributes the following rules are applied by the platform.

CascadeStatusUpdate value

RestrictStatusUpdate value

Behavior

False

false

When the Specify closure preference option in the Parent and Child case settings is not selected, incidents can be deactivated regardless of the status of parent or child incidents.

False

true

Parent incidents can’t be deactivated if any active child incidents exist. If you attempt to do this, you get error -2147224495 with the message: “You can't resolve the parent case because it has {0} active child cases.”

True

false

When parent incidents are deactivated, any active child incidents are also deactivated.

True

true

The application won’t allow both of these values to be set. You shouldn’t set both of these organization attribute values to true.

See Also

Service entities (contract, incident, knowledge base, queue, calendar, entitlement, slakpiinstance)
Incident (case) entities
Incident (case) entity messages and methods
IncidentResolution (case resolution) entity messages and methods
Sample: Close an incident

© 2016 Microsoft. All rights reserved. Copyright