About Self-Referential 1:N and N:N Relationships

In this article, we will discuss Self-referential 1:N and N:N relationships in MS Dynamics CRM 2011. It fulfills the need of maintaining parent-child relationships using the same entity. To simply understand this lets consider an example of custom entity Office which can be used to keep records of parent office as same as child office. In fact, this is a 1:N relationship.

Self-referential relationships

A self-referential relationship is a relationship between an entity and itself. There are two types of  self-referential relationships:

  • Self-referential 1:N relationships
  • Self-referential N:N relationships

Self-referential 1:N relationships

Self-referential 1:N relationships are useful for representing the hierarchical associations between the records, for example, a master order with related sub-orders.
Self-referential 1:N relationships can have a parental relationship behavior. If the relationship behavior is parental, any assign, share/unshare, reparent, delete, or merge action applied to the parent record will also be applied to all its child records.
A self-referential relationship cannot be used to create either direct or indirect circular relationships where the primary record is related to itself or any record in its own hierarchy.
To create a self-referential 1:N relationship, follow the procedure to create a 1:N relationship and specify the primary entity to be the same entity as the related entity.

Self-referential N:N relationships

Self-referential N:N relationships are useful for representing the loose associations between records, for example, cases linked to other cases where the root cause of all cases is the same.
To create a self-referential N:N relationship, follow the same procedure that we discussed earlier in previous section for creating an N:N relationship and specify the initial entity to be the same entity as the other entity.

Articles in the course

  1. Security privileges
  2. Custom entity privileges
  3. Delete & Managed properties
  4. Field datatypes
  5. Removing form components
  6. Selecting default view
  7. Selecting chart type
  8. Organization-level auditing tips
  9. Configuring entity-level auditing
  10. Configuring field-level auditing
  11. Campaign responses
  12. Standard security roles
  13. Business units and inherited security roles
  14. Applying security roles to users and teams
  15. create custom security role
  16. Managing teams & create team
  17. Add & Remove users to team
  18. Add teams to user
  19. Assign & Remove security role to team
  20. Share & Unshare records with team
  21. Delete team
  22. Creating and managing users
  23. Disable and Enable User
  24. Reassign user’s records another user
  25. Assign security role to user
  26. How to assign user to team
  27. Types of entity Relationship & Unsupported relationship
  28. 1:N and N:1 and Custom 1:N Relationships
  29. Primary Fields Lookup Values and Relationship Behaviors
  30. Native N:N and Manual N:N Relationship
  31. Self-Referential 1:N and N:N Relationships
  32. Creating and modifying mappings
  33. Requirements for mapping
  34. Creating connection roles
  35. Creating connection
  36. Editing tabs
  37. Editing sections
  38. Editing fields
  39. Editing navigation area
  40. Editing the header and footer
  41. Adding sub-grids
  42. Adding iFrames
  43. Adding web resources
  44. Previewing forms
  45. Advanced Find & Associated view
  46. Lookup & Quick Find view
  47. Creating view & organizing data in view
  48. Adding and maintaining fields in a view
  49. Adding charts to entities
  50. Exporting & importing system and user charts
  51. Configuring organization-level auditing
  52. General System setting
  53. Calendar & Formats & Auditing
  54. E-mail
  55. Marketing & customization
  56. Outlook
  57. Reporting
  58. Goals
  59. CRM for Outlook settings & System Settings
  60. CRM for Outlook Personal Options
  61. Managing the business units
  62. Creating custom entities
  63. Custom entity options & its detail
  64. Customizing entities
  65. Customizing an entity from a grid or form
  66. Showing an entity’s dependencies
  67. Publishing entity & updating entity’s icon
  68. Datatype descriptions
  69. Field properties and its detail
  70. Customizing fields & Advantages of creating & modifying field
  71. Modifying existing fields & Creating custom fields
  72. Field-level security & Enabling it
  73. Method 1: Creating the global option set first
  74. Method 2: Creating the global option set while creating the field
  75. Modifying & Deleting global option set