vTiger has a flexibility of creating custom picklist, text, currency… fields, however is lacking an option to create custom lookup/related to/relationship fields. We’ve created a detailed guide to walk you through creating a custom Contact or Organization relationship field.
Note, it will require some knowledge of MySQL database and how to connect to it, but other than that – the steps are fairly simple.
Open Field Editor. (CRM Settings > Modules > Select the Module > Edit Fields)
Create new Custom Field. Select field type as Integer as it will be storing record id. Length can be set to 10(or more if you are planning to have 10M+ records).
Easiest way to connect to vTiger Database is via phpMyAdmin. Once connected, open the table vtiger_field and find the new field just you created. The quickest way to find the custom field is to sort the records by fieldid – the most recent will be at the top.
Once you located the record, open the record in the edit view and change the uitype to ’10’. Also, please note/write down the fieldid – it will be necessary in the next step. In this case it’s 766.
While at phpMyAdmin, find the table ‘vtiger_fieldmodulesrel‘ and this is where you will establish the linkage. We will be creating additional Organization lookup field for the contact.
Insert a new record into the table:
Once the record is saved & inserted into the table – you can now see your new shinny Organization lookup field.
In order to create Contact, Opportunity, Ticket, Lead, Project, Invoice, Project Task, Service, Faq, Product, Quote, Sales Order, Purchase Order or any other custom module – you would follow the same process, but just use different values in ‘module’ field and ‘relmodule’ when creating new record in vtiger_fieldmodulerel table.
If you are having trouble creating the fields or need professionals to take care of it for you – please contact us at support@VTExperts.com or give us a call!
36 Comments
Chat started
Tarun
Problems with vtiger lookup
No create permissions or not enabled for quick create
is the error that is showing up
You must have did something wrong – double check the steps.
it’s working now but when the look up for a field comes it is only selecting limited columns can selects the first columns can we change that if yes then how
You can not do it within the interface, you will have to modify the files, I believe the file is called ‘Popup’
can I do that from dos?
Is it somehow possible through the edit-fields function?
You could, but you have to know mysql to be able to connect via dos and run queries. What I would recommend is just download mysql workbench, connecting to the database and doing the changes that way.
Thank you, I created 2 identical custom fields and it worked:
“fieldid” “module” “relmodule” “status” “sequence”
“714” “Leads” “Contacts” \N \N
“716” “Contacts” “Contacts” \N \N
But i didn’t mange to add mapping between the 2 fields (on “convert Lead”). Is it possible?
in vTiger 6.1 the Custom Field type must to be TEXT, not integer!
This is very important note btw, thanks a lot! I’ve spent hours to get it working…
Good morning,
I followed your procedure to create Lookup/Related To/Relationship Field in vTiger.
it worked GREAT twice.
At third time, i made a mistake at vtiger_fieldmodulesrel step where i typed in relmodule field as CitiesJor instead of cityJor.
then, after insertion completed, i corrected the mis-spelling, (this mistake might\mightnot be a cause of the coming problem).
now, :
1**when i type in lookup field in module, it cannot get the rel-module info, It shows (No Results found).
2**when i click at “select” icon of lookup field in module, the rel-module popup window shows with rel-module records shown. if i choose a specific record, then back to module lookup field, the “type to search” square shows shaded “type to search”, without record of module shown in, without ability to type in anything.
MOREOVER, i tried :
1** to create new\replacement lookup field to same problematic rel-module, it ends up with same problem.
2** to create new\replacement rel-module with new lookup field in module, it ends up with same problem.
Help, please.
The only thing I can think of is that your records in the don’t have vtiger_crmentity.label field filled in? that is the that is actually displayed when you search for records.
can you please explain further !
i went back to previous version of website\database, and repeated the the whole issue again, without making the “suspected” mistake again. i ended up at the same problem , being
>> 2**when i click at “select” icon of lookup field in module, the rel-module popup window shows with rel-module records shown. if i choose a specific record, then back to module lookup field, the “type to search” square shows shaded “type to search”, without record of module shown in, without ability to type in anything. <<
any thoughts ?
resolved.
I found out the problem was that rel-module had no identifier field !
I donot know how that happened in first place. maybe because i had the main field of rel-module had an identical name to module itself.
Thanks for sharing!
Is there any possibility to make a two-way relationship field?
For example, I have two groups: providers and consumers. Each provider has at least one consumer. I’m willing to add a relationship field to both forms, that’s pretty clear now, but when I’m choosing a consumer for a provider, it want consumer to see that thing automatically. In other words, I want for customer1 to see if it’s related to provider1 and backwards.
.
You will probably want to add related list instead 1:1 linkage, because I’m sure you want your provider to have multiple customers
Sure, that’s what I want. But I can’t find an easy way to implement it.
I might have missed something, but the field “Related to” seems also doesn’t make any sense. When I set my customer1 to be related to provider1, provider1 still knows nothing about it. This is not a relationship, not even a link. It’s just a informational listbox element linked to some module. It’s useless in terms of relationship!?
I wonder if I could implement something in this way:
Provider1, field “Customers”, linked values: “Customer1”, “Customer2”, “Customer3”, etc.
Customer1, field “Provider”, linked values: “Provider1”.
It’s a simple parent-child relationship which I would want to use with Accounts.
By the way, this feature was implemented in SugarCRM from the start. So I can’t get why it’s not working here the same way.
Hi Valery,
I have the same problem. Did you ever found a solution on that?
hello vallery,
what you are looking for is “related tabs”.
check , say, contacts, choose any contact, you get related tabs at your right.
hi hasan, i m facing same problem. when i click on search popup showing leads list, but when i select any record it does not grab the field details into that field. i have notice that you solved this problem once. i read all you comment in vtiger. let me explain: i am using related field in quotes modules and grabbing the data from leads modules, in my leads modules there is one custom field name “business name” and i want to show all business name in that search field…
Avi – what you are asking is narrow down the popup results, this is something that would have to be done in the code.
Excelente solucion Gracias. Thx
These instructions are not working with vTiger 6.2.
I’ve tried it with a custom field in the organizations form for relations to another organization.
fieldmodulerel:
764 Accounts Accounts NULL NULL
The created custom field with uitype=10 seems to be locked. It stays empty and cannot be touched.
There is also no button for search.
I successfully created a lookup custom field for Leads module and a same field for Contacts module. But I don’t know how to map those field while running Leads conversion. Is it possible? I have same concern with Yaron above.
Quote: [Perino
These instructions are not working with vTiger 6.2.
I’ve tried it with a custom field in the organizations form for relations to another organization.
fieldmodulerel:
764 Accounts Accounts NULL NULL
The created custom field with uitype=10 seems to be locked. It stays empty and cannot be touched.
There is also no button for search.]
Did you find a solution to this one? I also have the same problem.
I’ve tried field type of integer and text when first creating, but the same problem.
Would love to have a solution. I’m using the free version, 6.3.0
Hi,
How I create a create custom lookup/related to/relationship field in Sales Order, Invoice, etc, with users list options.
Is there a way to create a custom field as above but lookup the phone number. So in tickets it has the account name. I want to be able to get the primary phone number from the originization the ticket is assigned to and add it to the ticket. It does not even have to be editable.
It is possible, however what you are looking for is probably an autofill ability when you select account for the ticket – it could autofill ticket fields with account e.g ticket.phone=account.phone
Here’s the extension which can do that: https://www.vtexperts.com/extension/vtiger-field-autofill/
Shoot me an email at support@vtexperts.com if you have questions
Thanks
Hi everyone, is it possible to create a lookup field for users?
Yes – you need to create field and change uitype to ’52’
Or… If anyone has suggestions to have role based contacts to an opportunity, that would be helpful. Attorney, banker, CPA, real estate agent, appraiser, etc…. I like the summary view widget to see phone number etc… But need the role defined so use lookup fields. Need to eliminate the double entry somehow
Travis – I see, you probably want to create a custom modules OpptContactLink and then use that as a bridge to link contact and oppt.
Take a look at this: https://www.vtexperts.com/vtiger-7-customization-contact-relationship-referral-management/
Perhaps this will help.
I think I have a problem related to above. I created a list in a custom module (A) related to another custom module (B) – works fine. Then I created a UI Type 10 field in module (B). It seems to work correctly, I can select records from Module (A). Is there a way to link the list in (A) and the field in (B) so that, if I select a record in one module, it shows up in the other? I feel like I’m missing something simple, since this is pretty basic CRM function.
Does this step-by-step apply to current versions of Vtiger (which are not downloadable, data is stored on the cloud)?