0 Comments | 0 Shares | Urdhva Tech | Tags: SugarCRM7 Filter Dropdown Parent Module

Filter records based on parent module's dropdown field in SugarCRM7.

For example, filter the Contacts module record on the Accounts module's Industry field. Please look at attached screenshot.

(1) create file at custom/Extension/modules/Contacts/Ext/Vardefs/accountIndustryType.php and write the following code into it.

$dictionary['Contact']['fields']['account_industry_type'] = array(
    'name' => 'account_industry_type',
    'source' => 'non-db',
    'massupdate' => false,
    'type' => 'enum',
    'options' => 'industry_dom'

(2) Write the following code into custom/modules/Contacts/language/en_us.lang.php

$mod_strings['LBL_ACCOUNT_INDUSTRY_TYPE'] = 'Account Industry Type';

(3) write the following code into fields array of custom/modules/Contacts/clients/base/filters/default/default.php file.

'account_industry_type' => array(
            'dbFields' => array(
                0 => 'accounts.industry',
            'type' => 'enum',
            'vname' => 'LBL_ACCOUNT_INDUSTRY_TYPE',

(4) Do "Quick Repair and Rebuild".

(5) Open Contacts ListView and search on Accounts Industry Type.


Download attachments:
  • No Comments Found.
Post your comment