Hi all,
I extended the Calls module by a ID field pae_contact_id, linked to the Contacts Module. (see code below of the pae_vardef)
Additional I want to display & search the Contact Name and Country in the Calls List View.
Displaying the data works, but when trying to search the Country, I just get a list of all Contacts to filter on a single Contact:
What do I need to change to be able to search for e.g. all Calls where the Contact Country is "DE"
Many thanks for your help :)
Sven
// custom/Extension/modules/Calls/Ext/Vardefs/pae_vardefs.php $dictionary['Call']['fields']['pae_contact_id'] = array( 'name' => 'pae_contact_id', 'vname' => 'LBL_PAE_CONTACT_ID', 'type' => 'id', ); $dictionary['Call']['fields']['pae_contact_name'] = array( 'name' => 'pae_contact_name', 'vname' => 'LBL_PAE_CONTACT_NAME', 'rname' => 'name', 'type' => 'relate', 'id_name' => 'pae_contact_id', 'source' => 'non-db', 'link' => 'pae_contact_link', 'sort_on' => array('name',), 'module' => 'Contacts', 'table' => 'contacts', 'audited' => true, ); $dictionary['Call']['fields']['pae_contact_country'] = array( 'name' => 'pae_contact_country', 'vname' => 'LBL_PAE_CONTACT_COUNTRY', 'rname' => 'primary_address_country', 'type' => 'relate', 'id_name' => 'pae_contact_id', 'source' => 'non-db', 'link' => 'pae_contact_link', 'sort_on' => array('name',), 'module' => 'Contacts', 'table' => 'contacts', 'audited' => true, 'readonly' => true, ); $dictionary['Call']['fields']['pae_contact_link'] = array( 'name' => 'pae_contact_link', 'type' => 'link', 'relationship' => 'pae_rel_contact', 'vname' => 'LBL_PAE_CONTACT_NAME', 'source' => 'non-db', ); $dictionary['Call']['relationships']['pae_rel_contact'] = array( 'lhs_module' => 'Contacts', 'lhs_table' => 'contacts', 'lhs_key' => 'id', 'rhs_module' => 'Calls', 'rhs_table' => 'calls', 'rhs_key' => 'pae_contact_id', 'relationship_type' => 'one-to-many', );