Posts

Showing posts from February, 2022

Create custom N to N relationship in Dynamics CRM

Image
Disclaimer:  It is recommended to use the existing OOB N: N relationship for an entity. The custom N: N relationship is only to be used for entities that do not support the N: N relationship. As the title suggests, in this blog we are going to discuss how to create a custom N: N relationship. The topic is divided into the following parts: 1. Need of custom N: N relationship. 2. Implementing custom N: N relationship. So, let's begin. 1. Need of custom N: N relationship         One day, I received a requirement to develop functionality where a user can add multiple users and contacts for appointments and phone calls, and later on, he can send notifications to selected contacts or users via mail. The approach was simple, to create an N: N relationship between appointment to user and contact and then add a subgrid on the form for each entity. But for activity entities, CRM does not allow you to create an N: N relationship.  Hence, a custom N: N relationship was needed to be created to