AnsweredAssumed Answered

How to prefill a filter for Account Name on Contacts popup in Tasks?

Question asked by Mixa.Re Mixa.Re on Jun 16, 2014
Latest reply on Jul 30, 2015 by Zied Ahmed
Hi Guys

Scenario is: we are in the TASK module, related to = Account: Tecno Group LLC
than Contact Name = select contact from the popup list

Great idea is filter Contact name during popup selection, based on the related parent Account for not display all full list of thousand contacts inside SugarCRM..



what i do is on file:
/modules/Tasks/metadata/editviewdefs.php

after line:
          'label' => 'LBL_CONTACT_NAME',

add the filter:
          'displayParams' =>
            array (
            'initial_filter' => '&account_name_advanced=Tecno Group LLC',

than the PopUp url is:
    index.php?module=Contacts&action=Popup&query=true&account_name_advanced=Tecno Group LLC&mode=single&create=true&field_to_name[]=name

GOOD Account Name on Task popUp was prefilled

Question is:

How to recover Account Name inside filter for file editviewdefs.php ?

every body can help me

thanks

//

note this hack is out of date - not work
http://www.dobre.name/sugarcrm/how-to-add-initial_filter-for-popup-with-a-value-taken-from-another-f...

Outcomes