CRM entity... · Web viewBasically, this just means that you link the records in one entity to...

13
Title: Understanding entity relationships in Dynamics CRM (Do Second—Word Count: 611) Final Action In this video we’ll discuss what entity relationships are, why they’re important, and how to use them. Page 1 of 13

Transcript of CRM entity... · Web viewBasically, this just means that you link the records in one entity to...

Title: Understanding entity relationships in Dynamics CRM(Do Second—Word Count: 611)

Final ActionIn this video we’ll discuss what entity relationships are, why they’re important, and how to use them.To make the most of your CRM solution, you’ll need to set up relationships between your entities. This is due to the fact that Dynamics CRM is built on a relational database. Basically, this just means that you link the records in one entity to those in another. This saves you from having to enter information for any given record more than once.

Figure 1: Information Set #1 Figure 2: Information Set #2

Page 1 of 8

Final ActionFor illustration purposes, we’ll use an example pet grooming salon business. You may have clients with multiple pets, and you’ll want to be able to make multiple appointments for multiple animals.

If you track this info in a spreadsheet, you’ll have to enter the information for each animal and pet owner every time you schedule an appointment.

If, on the other hand, you separate the animal and pet owner information into different entities, you can enter the information for each only once and then pull it in each time you schedule an appointment.

Contacts

Animals

Page 2 of 8

Final ActionIn CRM, you can create three types of relationships: one-to-many, which is displayed as 1:N in the user interface, many-to-one, displayed as N:1, and many-to-many, displayed as N:N.

One-to-many relationships are relationships in which a given record in one entity (the primary entity) is related to more than one record in a second entity (the related entity). For example, in our grooming salon, one customer might have several pets.

Page 3 of 8

Final ActionMany-to-one relationships are really just one-to-many relationships from the perspective of the related entity. Many pets may have a single owner.

Many-to-many relationships are a little different. We’ll talk about them in a moment.First, let’s see how to create a one-to-many relationship between Contacts and Animals.

Begin by opening the entity that represents the “one” side of the relationship. In this case, we’ll open the Contact entity, and then double-click 1:N Relationships

<Animate the following steps>

Click New 1-to-Many Relationship.

Page 4 of 8

Final ActionThe Primary Entity field is filled-in for you, based on the entity you selected as the “one” side of the relationship. For the Related Entity, field, click the drop-down and select Animal. (This is a custom entity we created earlier.)

Next, enter a Display Name for the lookup field. This is the field that connects the two entities. Designate whether having a value in this field is required. In general, you should select Optional unless it’s critical that users enter data for that field; otherwise users may enter data you don’t want.

Page 5 of 8

Final ActionSelect the type of relationship behavior you want—in this case, we’ll choose Parental. By selecting this option, when a user shares or reassigns ownership of a Contact record, the ownership of the related animal record will also be shared or reassigned.

Click Save and Close. Publish the customizations so that the relationship takes effect and can used.

Many-to-many relationships are a little different. Say you want to be able to send several invoices to several different customers. This requires a many-to-many relationship. In this case, you need an intersect entity between the two entities.

The best way to create a many-to-many relationship is to let the system do the work.

Page 6 of 8

Final ActionTo do this, set up the relationship using the N:N Relationships option. To set up your system to accept several invoices for a single customer, expand the Contact entity, click N:N Relationships, and then click New Many-to-Many Relationship. (It would work just as well if you started with the Invoice entity).Select the Other Entity, which in this case is Invoice.

Page 7 of 8

Final ActionClick Save and Close, and then Publish All Customizations.

For more information, check out the Understanding and creating entities video, and the Entity relationship behavior article on MSDN.

Page 8 of 8