I try to manually create a custom field of type relate, for this I am doing in public/legacy/custom/Extension/modules/some_module/Ext/Vardefs/custom_fields.php
the following
$dictionary['some_module']['fields']['some_field'] = array(
'name' => 'some_field',
'vname' => 'Some label',
'type' => 'relate',
'module' => 'another_module',
'source' => 'non-db',
'massupdate' => 0,
'no_default' => false,
'comments' => '',
'help' => '',
'importable' => 'true',
'duplicate_merge' => 'disabled',
'audited' => true,
'reportable' => true,
'len' => 36,
'size' => '20',
);
But after repairing and rebuilding the new field is not generated
From another project I can see that a created field was created as follows
$dictionary["pulseras_artistas"]["fields"]["tipo_acreditacion_c"] = array (
'name' => 'tipo_acreditacion_c',
'type' => 'relate',
'dbType' => 'id',
'rname' => 'id',
'module' => 'tipo_pulsera',
'id_name' => 'tipo_acreditacion_c',
'reportable' => false,
'vname' => 'LBL_TIPO_ACREDITACION_ID',
'audited' => true,
'massupdate' => false,
'id'=>'PAtipo_acreditacion_c'
);
$dictionary["pulseras_artistas"]["fields"]["tipo_acreditacion_name"] = array (
'name' => 'tipo_acreditacion_name',
'rname' => 'name',
'id_name' => 'tipo_acreditacion_c',
'vname' => 'LBL_TIPO_ACREDITACION_NAME',
'type' => 'relate',
'link' => 'sonar_tipo_pulsera',
'table' => 'sonar_tipo_pulsera',
'join_name' => 'tipo_pulsera',
'isnull' => 'true',
'module' => 'tipo_pulsera',
'ext2' => 'tipo_pulsera',
'dbType' => 'varchar',
'len' => 100,
'source' => 'non-db',
'unified_search' => true,
'importable' => 'required',
'studio' => 'visible',
'inline_edit' => false,
'id'=>'PAtipo_acreditacion_name'
);
$dictionary['pulseras_artistas']['fields']['tipo_acreditacion_name']['labelValue'] = 'Tipo de Acreditación';
In the table of the other project I can see that the field created is tipo_accreditacion_c
Is the above way the correct way to create this type of field?