Articles in this section
Module Management - Creating a Relationship Between Modules
Table of Contents
Introduction
|
Not just Tasks, you can create a relationship between any two modules. The purpose of doing this is to enable the linking of related records.
For instance, consider that there is a contact record and a deal record on your CRM account. To link the deal to the contact, you must relate the Deals and Contacts modules.
In this article, we will tell you about the different relationship types and how you can relate modules in Vtiger CRM.
Different Relationship Types
Depending on your requirements, you can create four types of relationships.
- One-to-one
- One-to-many
- Many-to-one
- Many-to-many
Let us learn about them one by one with examples.
One-to-one relationships
A one-to-one relationship relates a single record of Module 1 to a single record of Module 2. You must specify the reference field names for both modules while setting up the relationship.
For example, if you want to link only one deal to every contact record, then you can create a one-to-one relationship between the Contacts and Deals modules. A reference field for the related contact and deal is created in the deal and contact records, respectively.
One-to-many relationships
A one-to-many relationship relates a single record of Module 1 to multiple records of Module 2. In this case, Vtiger CRM creates a reference tab in Module 1 to hold all the related records of Module 2. It also creates a reference field in Module 2 to hold the related record of Module 1.
Here is an example of a one-to-many relationship.
When a deal is in the Value Proposition stage, you must send a quote to your contact for approval. There is a chance that the contact does not accept your quote on the first go. So you revise the quote and send it again. In this situation, you create multiple quotes and link them to the deal record.
Note:
- You can now map fields between a Parent module and a Child module. When you create a child module record from the Parent module, the system automatically copies the field data from the Parent record to the Child record.
- For example:
- Copying a Contact’s mobile number to Deal record and Invoice record.
- Copying the date from a Case record to an Invoice record.
- You can map fields for one-to-many and many-to-many relationships (for all modules) from the Modules and Layout > Relationship tab using the Settings icon.
- Clicking the Settings icon opens the Record Template window where you can map Source and Related fields using the Add Mapping button.
Many-to-one relationships
A many-to-one relationship is the reverse of the one-to-many relationship. It relates multiple records of Module 1 to a single record of Module 2. Vtiger CRM creates a reference field in Module 1 and a reference tab in Module 2.
For example, if you send a client’s order in multiple deliveries, then its related purchase order will have multiple receipt notes.
Many-to-many relationships
A many-to-many relationship relates multiple records in Module 1 to multiple records in Module 2 and vice versa. There will not be a unique relationship between records in Module 1 and Module 2. A tab is created in both modules to hold related records.
For example, if there is a many-to-many relationship between the Assets and Quotes modules, you can relate an asset to multiple quotes and a quote to multiple assets.
Creating a Relationship between Modules
To create a relationship, we first need to land on the Relationships page.
Follow these steps to view the Relationships page:
- Log in to the CRM.
- Click the User Menu on the top right corner of the screen.
- Click the Settings button. You will land on the Settings page.
- Look for the Module Management section.
- Click Module Layouts & Fields.
- Select a module from the Select Module drop-down. You can pick one of the two modules that you want to relate.
- Click the Relationships tab.
Follow these steps to create a relationship:
- Log in to the CRM.
- Click the User Menu on the top right corner of the screen.
- Click the Settings button. You will land on the Settings page.
- Look for the Module Management section.
- Click Module Layouts & Fields.
- Select a module from the Select Module drop-down. You can pick one of the two modules that you want to relate.
- Click the Relationships tab.
- Click the +Add Relationship button.
- Select the related module from the Select related module drop-down.
- Pick the relationship that you want to create from the Select relationship type.
- Enter the field name of the related records.
- Enter the tab name of the related records.
- Click Save.
Deleting a Relationship
You cannot delete the relationships provided in Vtiger CRM by default. You can delete only the custom relationships that you create.
Follow these steps to delete a relationship:
- Log in to the CRM.
- Click the User Menu on the top right corner of the screen.
- Click the Settings button. You will land on the Settings page.
- Look for the Module Management section.
- Click Module Layouts & Fields.
- Select a module from the Select Module drop-down. You can pick one of the two modules that you want to relate.
- Click the Relationships tab.
- Select a module to view all its relationships.
- Click the Delete icon beside a relationship.
- Click Yes to confirm the deletion.