Here we start Native N:N & manual N:N relationship.

N:N relationships
In an N:N relationship (also called a many-to-many relationship), a record of one entity can be associated with zero or more records of a second entity, and records of the second entity can be associated with zero or more records of the first entity.

Native and manual N:N relationship types
When an N:N relationship exists between two entities, an intersection entity stores the identifiers of each related record.
The following diagram shows a policy, policy claim, and claim entities. The policy and claim entities have an N:N relationship. A policy can have many claims and a claim can be against many policies. The policy claim entity is the intersection entity that is used to store the identifier of each related policy and claim.

Native N:N & manual N:N relationship

There are many scenarios where native N:N relationships will meet our requirements. However, in our example, let’s say we need to store the value of each policy claim because the total amount of the claim might be split against several different policies.
The native N:N policy claim intersection entity is hidden and cannot be customized, so we cannot create a custom attribute on the policy claim entity.

Manual N:N relationships rely on you to create a custom intersection entity with two 1:N relationships that together act as an N:N relationship. Just like any other custom entity, we can see a manual intersection entity in the CRM user interface, we can customize it, and we can interact with it programmatically.

So in our example, instead of creating a native N:N relationship between the policy and claim entities we could create a policy claim entity with the 1:N relationships to the policy and claim entities. Now, we can customize the policy claim entity by creating a policy claim amount field, and any other fields such as the date that the
claim became associated with the policy, the status of the policy claim, and so on.

Creating a native N:N relationship
To create a native N:N relationship, follow these steps:
1. In the navigation pane, click on Settings.
2. In the Customization group, click on Customizations and then click on Customize the System to open the default solution.
3. In the left-hand navigation area of the solution, expand the Entities component and then expand the  appropriate entity.
4. Click on the N:N Relationships area.
5. In the grid toolbar, click on New N:N Relationship.
6. In the New Relationship pop-up window, under the Other Entity section,provide the entity name of the other entity, with which you want to create the N:N relationship, in the Entity Name field.
7. For each entity, provide the following information in the Current Entity field:
°° Display Option: This field specifies whether the other entity records are displayed from the current entity record or not. The following options are availabel for this field:
Use Plural Name: The other entity records are displayed in an area on the current entity record by using plural name of the other entity as the area label.
Use Custom Label: The other entity records are displayed inan area on the current entity record by using a custom label for the area.
Do Not Display: The other entity records are not displayed on the current entity record.
Custom Label: This is the custom label used when the Display Option field is set to Use Custom Label.
Display Area: This is the area group on the primary record where the related records are displayed.
°° Display Order: This is the sort order of the related records area on the primary record.
8. In the Relationship Definition section, provide the following information:
°° Name: Schema name of the relationship
°° Relationship Entity Name: The name of the hidden intersect entity
9. Click on Save and Close.

Native N:N & manual N:N relationship

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