The connections provide a flexible way to connect and describe the relationships between any two entity records Microsoft Dynamics 365. Connections enable you to easily associate users, contacts, quotes, sales orders, and many other entity records with each other. The records in the association can be assigned particular roles that help define the purpose of the relationship.
Connections provide the following capabilities:
- An easy and flexible way to make a connection between two records of most Microsoft Dynamics 365 entity types. All customizable business and custom entities can be enabled for connections.
- An option to add useful information, such as a description of the connection and the duration.
- The ability to create connection roles that describe the relationship between two records, such as a relationship between a doctor and a patient, or a manager and an employee.
- A quick way to create multiple connections and roles for a particular record. For example, a contact may have many relationships with other contacts, accounts, or contracts. In each relationship, a contact may play a different role.
- Information for building queries and creating graphs. You can search for all connections and connection roles for a particular record and create graphs and charts for a visual representation of the connections.
- Support for workflows and auditing for automating and improving business processes.
Note: When you create a connection entity record, two records are created in the database. The first record represents a source to target connection and the second record represents a target to source connection. This guarantees that a query will find all connections that the record participates in, regardless whether the record is a source record or a target record in the connection.
Connections enable us to establish relationships between any records in CRM without creating custom relationships between entities. Creating multiple relationships with a specific entity may make the form clumsy. Connections enable us to keep the form cleaner. Connections enable us to maintain multiple relationships wit the same entity. Connections are out of box.
Any many to many relationship table creates an intersection table in background to maintain them. However, this can be avoided using connections.
With connections, no custom SQL index is required since it is an out-of-the-box feature and the fields are already indexed.
Limitation/Best practice: it is not advised to customize connections entity. If the requirement is to store role, description and duration along with source and target entities, connection is a perfect fit. In other case, it is recommended to create custom many to many relationships.