Custom varderf file is ignored

Hi there,

I’ve added a custom file to the Tasks module in custom/modules/Tasks/Ext/Varderf/lead_phone.php with the following contents:


$dictionary['Task']['fields']['lead_phone_mobile'] = [
    'name' => 'lead_phone_mobile',
    'rname' => 'phone_mobile',
    'vname' => 'LBL_LEAD_PHONE',
    'reportable' => false,
    'id_name' => 'parent_id',
    'join_name' => 'leads',
    'type' => 'relate',
    'module' => 'Leads',
    'link' => 'leads',
    'table' => 'leads',
    'studio' => true,

However, after a repair/rebuild, the new “lead_phone_mobile” field is not available in the studio, nor is it added to the Task object.

If I manually paste the array into the automatically-generated vardefs.ext.php in the same dir, the variable appears and is correctly populated.

Isn’t the system supposed to pickup the custom lead_phone.php file and add it to the variable declarations?
Everything that I’ve read so far would suggest so.

This is on suitecrm 8.4.1.

If it’s SuiteCRM v8, then all the directory references in the docs have to be adjusted by prefixing public/legacy.

So if the Docs mention custom/Extension you need to use public/legacy/custom/Extension.

Other than that, it seems you’re trying to add customizations to the files that the QR&R generates, instead of to the source directories that the QR&R uses.

Follow the Docs more strictly, you should be adding stuff under custom/Extension etc

That was it! Thanks.

I had glazed over the prescribed path in the docs, making my own assumption instead because of the location of the generated vardefs.ext.php.

1 Like