How to create related field with another module in Vtiger CRM

How to create related field with another module in Vtiger CRM

Vtiger supports a huge number of field types: text, currency, date, percent, and so on. However, in the field manager it is not possible to create a field associated with another module. Below we have prepared for you detailed instructions on how to link the module "Purchases" with "Accounts".

Keep in mind that this instruction will require you to use some MySQL database skills.

Step 1. Create a new field.

Open the field editor in Vtiger CRM. To do this, go to CRM Settings - Modules - Select the Purchasing module - Change fields.

Create a new field in the place you need. Select the field type "Integer". We will need this field in order to store in it data about communication with the counterparty. You can specify the length of the field 10.

Step 2. Change the field type to "Associated with"

To do this, we need to make some changes to the database. The most convenient way is to enter the Vtiger database through PHPMyadmin. Once you have entered the Vtiger database, go to the vtiger_field table and find the field you just created. Most likely, it will be the last in the list if you sort the fields by fieldid field.

Once you have found an entry, click on edit it and change the value of the "uitype" column to "10". Also write down for yourself the id of the field you created, we will need it in the next steps. In our case, it is 787.

Step 3. Create a connection between the modules.

Also, while in PHPMyadmin, find the vtiger_fieldmodulerel table. This is exactly the place where we will register the connection. We must indicate to the system that we are planning a new relationship between Purchasing and Counterparties.

To do this, you should add a new record to the table indicating the data in columns:

  • fieldid is the number we wrote down earlier, in our case it's 787.
  • module - your current module in which we created a new field, in our case, PurchaseOrder. If you do not know what your module name is, just go to Vtiger in this module, open the list of entries, look at the address bar and see the module name in it: module = PurchaseOrder.
  • relmodule is that module with which we make communication. In our case, this is the Accounts module.
  • status - do not touch, leave empty.
  • sequence - do not touch, leave empty.

After you have made a new record in the database, you can see the working field in the "Purchases" module, which is associated with the "Accounts".

Using these simple three steps, you can add a related field in any other modules.

Popular Posts

My most popular posts

Maximum productivity on remote job
Business

Maximum productivity on remote job

I started my own business and intentionally did my best to work from anywhere in the world. Sometimes I sit with my office with a large 27-inch monitor in my apartment in Cheboksary. Sometimes I’m in the office or in some cafe in another city.

Hello! I am Sergey Emelyanov and I am hardworker
Business PHP

Hello! I am Sergey Emelyanov and I am hardworker

I am a programmer. I am an entrepreneur in my heart. I started making money from the age of 11, in the harsh 90s, handing over glassware to a local store and exchanging it for sweets. I earned so much that was enough for various snacks.

Hire Professional CRM developer for $25 per hour

I will make time for your project. Knowledge of Vtiger CRM, SuiteCRM, Laravel, and Vue.js. I offer cooperation options that will help you take advantage of external experience, optimize costs and reduce risks. Full transparency of all stages of work and accounting for time costs. Pay only development working hours after accepting the task. Accept PayPal and Payoneer payment systems. How to hire professional developer? Just fill in the form

Telegram
@sergeyem
Telephone
+4915211100235