Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Custom dependency that hides/shows a given panel on RecordView if Sales Stage is set to Closed Lost on an Opportunity
<?php
/* File: ./custom/Extension/modules/Opportunities/Ext/Dependencies/hide_panel.ext.php */
$dependencies['Opportunities']['hide_panel'] = array(
'hooks' => array("edit"),
'trigger' => 'equal($sales_stage, "Closed Lost")',
'triggerFields' => array('sales_stage'),
'onload' => true,
'actions' => array(
array(
'name' => 'SetPanelVisibility',
'params' => array(
'target' => 'panel_hidden',
'value' => 'false'
)
),
),
'notActions' => array(
array(
'name' => 'SetPanelVisibility',
'params' => array(
'target' => 'panel_hidden',
'value' => 'true'
)
),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment