AnsweredAssumed Answered

Relate field in subpanel not working

Question asked by aqua.alex aqua.alex on Jul 17, 2014
Hello, I'm currently using 6.5.17 CE, but I don't think my problem is directly related to my version..

In my custom module, which is using the relation between Accounts and Contacts, I defined 2 subpanels (one for each). In the subpanel for Accounts user requested to see the title of the contact. I fixed Sugar so titles are shown again in names, but sadly the are missing in the subpanel..

Right now 2 solutions would be acceptable for me:
  1. in the 'Name' column the full name including the title is shown (currently it's just first_name+last_name)
  2. There is a separate column to display the title of the contact
Here are the vardefs:
'contact_name' => array(
'required' => false,
'name' => 'contact_name',
'id_name' => 'contact_id',
'type' => 'relate',
'rname' => 'full_name',
'vname' => 'LBL_CONTACT_NAME',
'link' => 'acr_contacts',
'module' => 'Contacts',
'source' => 'non-db',
'dbType' => 'non-db',
for the title-definition I just switched name with title and rname is 'title'. As I said, in views they are loading just fine (I tested in detailview)

Here the subpanel-definition:
'contact_title' => array (
'vname' => 'LBL_TITLE',
'widget_class' => 'AccountContactsDisplaySingleMember',
'widget_data' => 'contact_title',
'type' => 'varchar',
'module' => 'ICC_AccountsContactsRel',
'width' => '15%',
'default' => true,
'contact_name' => array (
'vname' => 'LBL_NAME',
'widget_class' => 'SubPanelDetailViewLink',
'module' => 'ICC_AccountsContactsRel',
'width' => '15%',
'default' => true,
If I try it this way the title-column will show the name as well. In the layoutdef-fields CONTACT_NAME is just filled with the first_name+last_name and field CONTACT_TITLE is empty.

So confusing.. any help?