0

Please I would like to know how to change the display name (in view mode) of a field in Vtiger 7 when linking a custom module to an existing module such as Account Module. It keeps displaying the default numbering field. Please see the following 2 images: I would the text "INSURANCE-21" in Image 1 replaced for example by the Insurance company name let say "Williams Insurance Group" in Image 2. Any idea please?

Image 1

Image 2

BoCyrill
  • 1,219
  • 16
  • 17

3 Answers3

1

Please find what is Insurance Company Name of the field name into a database. for example if field name like insurance_company_name then the queries become like that

UPDATE `vtiger_entityname` SET  `fieldname`="insurance_company_name" WHERE `modulename` ='Accounts' and `tablename` = 'vtiger_account';
Divyesh
  • 329
  • 3
  • 17
0

After a whole night and day of searching, I came out with a solution. Not sure if any cons. but this is the fix that worked: I updated this table vtiger_entityname and set the column fieldname to the name of the field that I would like to use as display name for the concerned module.

Hope it helps anyone who want to achieve the same result.

BoCyrill
  • 1,219
  • 16
  • 17
0

You must change module identifier. If you’ve ever tried to find an option to update a module identifier (the field that works as a link in a module) you most probably have noticed that vtiger do not allow this from the field editor. The only way to do it is using vtiger development library called Vtlib.

use the following code:

 // Turn on debugging level
 $Vtiger_Utils_Log = true;
 $targetmodule = 'InsuranceCompanies';
 $targetfield = 'insurance_company_name';
 include_once('vtlib/Vtiger/Module.php');
 include_once('vtlib/Vtiger/Field.php');

 $module = Vtiger_Module::getInstance($targetmodule);
 $field = Vtiger_Field::getInstance($targetfield, $module);

 $module->unsetEntityIdentifier();
 $module->setEntityIdentifier($field);

If you need to revert this back or make a backup, you need to backup the table vtiger_entityname

Hamid
  • 378
  • 3
  • 8
  • for existing records (old records) you have to change label column in vtiger_crmentity table – Hamid Jul 04 '19 at 22:42