4

I've created one 'account_category' field in account module. It is dropdown and have following options:

  1. principle
  2. customer
  3. supplier
  4. manufacturer

I created Account relationship with Opportunity module.

In the Account popup i want to display only those records which have account_category as principle.

My file path : custom/modules/opportunity/metadata/editviewdef.php

1 => 
          array (
            'name' => 'opportunities_accounts_1_name',
           'displayParams' => 
            array (
              'initial_filter' => '&account_category_c="Principle"',
            ),
          ),

But it is not working..

Please help to filter accounts on the basis of account_category_c as principle

Star
  • 3,222
  • 5
  • 32
  • 48
siddaramesh
  • 231
  • 2
  • 6
  • 24

1 Answers1

2

Add the word _advanced like this:

'initial_filter' => '&account_category_c_advanced="Principle"',

see:

http://academe.co.uk/2013/03/sugarcrm-relate-field-passing-default-values-to-pop-up-select-form/

http://developer.sugarcrm.com/2011/08/31/howto-using-a-relate-field-to-populate-a-custom-field/

Star
  • 3,222
  • 5
  • 32
  • 48
Daniel Samson
  • 718
  • 4
  • 18
  • _advanced is not working for this..1 => 'account_name', 'displayParams' => array ( 'initial_filter' => '&account_category_c_advanced="Principle"', ), – siddaramesh Dec 01 '15 at 05:08
  • Take a look at http://academe.co.uk/2013/03/sugarcrm-relate-field-passing-default-values-to-pop-up-select-form/ this explains how the initial filter works. – Daniel Samson Dec 01 '15 at 09:23