Dear Sugar Users,
I'm attempting to add two custom fields to our Accounts. These are:
- Tax Rates
- Currency
As neither of these fields can be added via the Relate data type in studio, i.e. they are not in the list of available modules, I have had to add them via a vardefs.ext.php file in "\custom\Extension\modules\Accounts\Ext\Vardefs\".
I have used a solution found here: Angel's Blog: SugarCRM Customization: Employees Relate Field (cheleguanaco.blogspot.com)
I have been able to add both fields. The Tax Rate works as expected, i.e. can add and edit on an Account.
However the Currency filed is visible but not editable. (See below)
Below is my vardefs.ext.php file
<?php
$dictionary["Account"]["fields"]["taxrate_name_c"] = array (
'required' => false,
'source' => 'non-db',
'name' => 'taxrate_name_c',
'vname' => 'Taxrates',
'type' => 'relate',
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => '0',
'audited' => false,
'reportable' => true,
'calculated' => false,
'len' => '255',
'size' => '20',
'id_name' => 'taxrate_id_c',
'ext2' => 'TaxRates',
'module' => 'TaxRates',
'rname' => 'name',
'quicksearch' => 'enabled',
'studio' => 'visible',
);
$dictionary["Account"]["fields"]["taxrate_id_c"] = array (
'required' => false,
'name' => 'taxrate_id_c',
'vname' => '',
'type' => 'id',
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => 0,
'audited' => false,
'reportable' => true,
'calculated' => false,
'len' => 36,
'size' => '20',
);
$dictionary["Account"]["fields"]["currency_c"] = array (
'required' => false,
'source' => 'non-db',
'name' => 'currency_c',
'vname' => 'Currency',
'type' => 'relate',
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => '0',
'audited' => false,
'reportable' => true,
'calculated' => false,
'len' => '255',
'size' => '20',
'id_name' => 'currency_id_c',
'ext2' => 'Currencies',
'module' => 'Currencies',
'rname' => 'name',
'quicksearch' => 'enabled',
'studio' => 'visible',
);
$dictionary["Account"]["fields"]["currency_id_c"] = array (
'required' => false,
'name' => 'currency_id_c',
'vname' => '',
'type' => 'id',
'massupdate' => 0,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'duplicate_merge_dom_value' => 0,
'audited' => false,
'reportable' => true,
'calculated' => false,
'len' => 36,
'size' => '20',
);
I'm not sure why there would be a difference between the two custom fields, they are essentially setup the same.
Any suggestions or recommendation would be great. Thanks.
FYI, running Sugar 12.0.0 Ent POn-Prem.