Create or edit N:N relationships between entities

Can I do this task?

A N:N relationship allows users to relate one or more records from another entity to a record of the current entity. More information: Entity Relationships

In the default solution, you can create new relationships or edit existing ones for all entities that allow customization.

In an unmanaged solution, you can create new relationships or edit existing ones for all entities that allow customization.

In a managed solution, you cannot create new relationships or edit existing relationships for entities. However, if the managed properties for an entity in the managed solution are set to allow customization, you can add or edit relationships to that entity in the Customization area of Microsoft Dynamics CRM.

  1. In the Navigation Pane, click Settings.
  2. Under Customization, click Customizations.
  3. In the Customization area, click Customize the System.
  4. Under Components, expand Entities, and then expand the entity you want.
  5. Click N:N Relationships.
  6. To edit a relationship or view the details for a relationship, select the relationship, and on the Actions toolbar, click Actions, and then click Edit.

    - OR -To add a new relationship, click the New Many-to-Many Relationship button.

  7. For a new relationship, in the Current Entity section, in the Display Option list, you can choose one of the following options:
    • Use Plural Name
    • Use Custom Label
    • Do Not Display

    When the Use Entity Plural Name or Use Custom Label options are selected you can choose from the Display Area field to specify where the relationship label will be displayed on the form. You can also specify the Display Order to control where the label will be included within the selected display area.

  8. In the Other Entity section, select the other entity in the Entity Name list.

    Note

    When you choose the Entity Name, default values will be set for the Name and Relationship Entity Name fields in the Relationship Definition section. If you change the Entity Name value before you save, these names will not change. Make sure these names are meaningful before saving.

  9. In the Relationship Definition section, confirm the Name and the Relationship Entity Name.
  10. These values must be unique among N:N relationships.
  11. Click Save and Close to close the N:N Relationship form.
  12. When your customizations are complete, publish them:
    • To publish customizations for only the component that you are currently editing, on the Home tab, in the Save group, click Publish.
    • To publish customizations for all unpublished components at one time, click Publish All Customizations.

Note

Any time you change user interface elements or implement form scripts for an entity, you must publish changes to apply them. Any customizations that change the data schema of Microsoft Dynamics CRM such as custom entities, relationships, or fields are applied immediately.

Related Topics

Entity Relationships

Understanding Hierarchical Entity Relationships

Mapping Entity Fields

Did you find the information that you need?
Yes      No 
If not, what information do you need? (optional)