Iād like to implement an initial filter
In the Contracts module, I have two relate fields:
I want this behavior:
When I select an Account, and then click to choose an Opportunity, the Opportunity dropdown or popup should only show Opportunities related to the selected Account ā not all Opportunities.
Could anyone please guide me on?
Hey
Since the Contracts module is running Legacy views you can use something like
1 =>
array(
0 =>
array(
'name' => 'billing_contact',
'label' => 'LBL_BILLING_CONTACT',
'displayParams' =>
array(
'initial_filter' => '&account_name="+this.form.{$fields.billing_account.name}.value+"',
),
),
1 => '',
),
For reference
This is the file that contains the code
public/legacy/modules/AOS_Invoices/metadata/editviewdefs.php