Created
January 31, 2018 10:41
-
-
Save elchele/801c8db1ffd5de37667cdcc79a4ab902 to your computer and use it in GitHub Desktop.
Custom dependency that hides/shows a given panel on RecordView if Sales Stage is set to Closed Lost on an Opportunity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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