PHP Code to subscribe email address

Relate field in sugar crm can be created using link field. A field is created that have module name, field name, reference id. this field is then added to meta data of respective module. In that case relate field works.
Here is some code for relate field.
‘deprtment_id’ =>
array(
‘name’ => ‘deprtment_id’,
‘rname’ => ‘id’,
‘vname’ => ‘LBL_DEPARTMENT_ID’,
‘type’ => ‘id’,
‘table’ => ‘rt_departments’,
‘isnull’ => ‘true’,
‘module’ => ‘rt_departments’,
‘dbType’ => ‘id’,
‘reportable’ => false,
‘massupdate’ => false,
‘duplicate_merge’ => ‘disabled’,
),
‘department_name’ =>
array(
‘required’ => false,
‘source’ => ‘non-db’,
‘name’ => ‘department_name’,
‘vname’ => ‘LBL_DEPARTMENT_NAME’,
‘type’ => ‘relate’,
‘rname’ => ‘name’,
‘id_name’ => ‘deprtment_id’,
‘join_name’ => ‘rt_departments’,
‘link’ => ‘rt_departments’,
‘table’ => ‘rt_departments’,
‘isnull’ => ‘true’,
‘module’ => ‘rt_departments’,
),


Now add this relate field name to your meta data layout files.Edit and details view of the module where you want to show this relate field.I have added relate field to students meta data file.Here is code.
array(‘document_name’),


Go to quick repair and rebuilt.





Leave a Reply

Your email address will not be published. Required fields are marked *