CRM Relationship Behavior (contd) – Cascading rule for Relationship Behavior

By | February 2, 2010
We had written on CRM Entity Relationships in one of our earlier post on this blog. To take this further today we would like to discuss the way the settings for the Cascading Rules affect the related entities when an action is performed on the main entity.

Cascading Rules:

Following action can be taken on the parent entity
– Assign
– Delete
– Merge
– Reparent
– Share
– Unshare
The cascading rules let you decide the action to be taken on the child entities when any of the above action is taken on the Parent. This helps you decide how to handle the child entities and if you want them to behave differently than the parent entity.

Say suppose you want Delete the parent entity, what action should be taken for the related child entities. Ideally you may want the child to be deleted along with the parent. But sometimes you may want it otherwise. You want to keep the child entities and delete the association with the Parent. You can define this using the cascading rules.

The following options are available.

Cascade All:
Perform the action on the primary entity as well as related entity.
e.g. if an account is assign to another user from current user then all its related contact will get assigned to the new user.

Cascade None:
Perform the action on the primary entity but not on the related entity.
e.g. if we delete a contact and do not want to delete the activity related to the contact, use Cascade None.

Cascade Active:
Perform the action on the primary entity. Also it performs the action on related entities which are active or open.
e.g. If we delete an account from CRM, using this rule we can avoid the deletion of related invoice and orders.

Cascade User-Owned:
Perform the action on the primary entity. It performs the action on cascade entity only if the related entity has same owner as that of the primary entity.
e.g. We can delete all the contacts related to an account which have the same owner and leave others untouched using this rule.

Remove Link:
Perform the action on the primary entity and remove the link of related entity. Do not perform any action on the related entity.
e.g. If we want to just delete the account and remove the link of account from contact, we can use this rule.

Restrict:
Perform the action only and only if no related entity exists. If any related entity exists the action is cancelled. This rule is applied on “Delete” action only.
e.g. If we don’t want to allow user to delete an account having any contact then we can use this rule to disallow user from performing “Delete” operation.

Understanding the way the relationships work goes a long way in working with Dynamics CRM. It helps you provide simple solutions to seemingly tough tasks.

——————————————————-
Posted by: Inogic
For more information/discussions (documents, sample code snippets, detailed work flow or diagrams),
Please be free to visit the following links or email us:
Web: http://www.inogic.com
Blog: http://inogic.blogspot.com
Email: news@inogic.com
—————————————————–