Created
April 9, 2016 07:28
-
-
Save AjayKumar01/68124d227b27a947ad2d21cb424c03e3 to your computer and use it in GitHub Desktop.
Hiding tabs using dependency in Record view
This file contains hidden or 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 | |
| /* Hiding tabs using dependency in Record view | |
| * Ajay Kumar | |
| * Path : custom/Extension/modules/Opportunities/Ext/Dependencies/hidetabs.php | |
| */ | |
| $dependencies['Opportunities']['hide_tabs'] = array( | |
| 'hooks' => array( | |
| "edit", | |
| "view" | |
| ), | |
| 'trigger' => 'true', | |
| 'triggerFields' => array( | |
| 'sales_stage' | |
| ), // what field should this be triggered on | |
| 'onload' => true, | |
| 'actions' => array( | |
| array( | |
| 'name' => 'SetPanelVisibility', // the action you want to run | |
| 'params' => array( | |
| 'target' => 'LBL_RECORDVIEW_PANEL1', // name of the panel, can be found in the vardefs. | |
| 'value' => 'equal($sales_stage, "Prospecting")' // the formula to run to determine if the panel should be hidden or not. | |
| ) | |
| ) | |
| ) | |
| ); | |
| ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment