Home  >   Articles   >  Module Management - Creating a Relationship Between Modules
Articles in this section

Module Management - Creating a Relationship Between Modules

Learn how to create a relationship between two modules.
R
Ruba
19 Nov, 2024 - Updated 1 month ago
Table of Contents

Introduction

Have you noticed when you create a task, its related documents, projects, cases, etc. are shown under the tabs on the right?

Ever wondered how that happens?

It works based on the kind of relationships you set up between the Tasks and other modules. 

 

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: 

  1.  Log in to the CRM.
  2. Click the User Menu on the top right corner of the screen.
  3. Click the Settings button. You will land on the Settings page. 
  1.  Look for the Module Management section.
  2. Click Module Layouts & Fields. 
  1.  Select a module from the Select Module drop-down. You can pick one of the two modules that you want to relate.
  2. Click the Relationships tab. 

Follow these steps to create a relationship: 

  1. Log in to the CRM.
  2. Click the User Menu on the top right corner of the screen.
  3. Click the Settings button. You will land on the Settings page.
  4. Look for the Module Management section.
  5. Click Module Layouts & Fields.
  6. Select a module from the Select Module drop-down. You can pick one of the two modules that you want to relate.
  7. Click the Relationships tab.
  1.  Click the +Add Relationship button.
  1. Select the related module from the Select related module drop-down.
  2. Pick the relationship that you want to create from the Select relationship type.
  3. Enter the field name of the related records.
  4. Enter the tab name of the related records. 
  5. 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:

  1. Log in to the CRM.
  2. Click the User Menu on the top right corner of the screen.
  3. Click the Settings button. You will land on the Settings page.
  4. Look for the Module Management section.
  5. Click Module Layouts & Fields. 
  1.  Select a module from the Select Module drop-down. You can pick one of the two modules that you want to relate. 
  1.  Click the Relationships tab. 
  1.  Select a module to view all its relationships.
  2. Click the Delete icon beside a relationship. 
  1.  Click Yes to confirm the deletion.  
Was this article helpful?
2  out of  15  found this helpful.
Comments 0
Be the first to comment
© Copyright 2023 Vtiger. All rights reserved.