Dependency Actions
Overview
The following sections outline the available SugarLogic dependency actions.
Dependency Parameters
Dependency definitions will generally contain most, if not all, of the parameters displayed in the table below. The following sections will outline each dependency action as well as dependency specific parameters.
Parameter |
Type |
Description |
hooks |
Array |
The views to execute the trigger on. Possible values are: "edit", "view", "save" and "all". If you include 'save' or 'all' then SugarCRM will try to save the calculated value to the database. So if your dependency is display only then only include the views that it will show up on.
|
trigger |
String |
A SugarLogic formula that determines if the dependency should run. Example: 'equal($status, "Closed")' .
Important: This must be a string, even if it's always true .
|
triggerFields |
Array |
Lists fields that should trigger re-evaluation of the logic when they change (in UI).
This should include all fields referenced in trigger and any SugarLogic used in actions.
|
onload |
Boolean |
Whether or not to trigger the dependencies when the page is loaded. |
actions |
Array |
One or more actions to execute when trigger evaluates to true. Examples: SetRequired , SetValue , SetVisibility .
|
notActions |
Array |
One or more actions to execute when trigger evaluates to false. Examples: SetRequired , SetValue , SetVisibility .
|
Topics
The SugarLogic ReadOnly action, located in ./include/Expressions/Actions/ReadOnlyAction.php, is used to determine if a field is editable or not based on a formula.
The SugarLogic SetOptions action, located in ./include/Expressions/Actions/SetOptionsAction.php, is used to set the options list of a dropdown field based on a formula.
The SugarLogic SetPanelVisibility action, defined in ./include/Expressions/Actions/PanelVisibilityAction.php, is used to determine the visibility of a record view panel based on a formula.
The SugarLogic SetRequired action, located in ./include/Expressions/Actions/SetRequiredAction.php, is used to determine if a field is required.
The SugarLogic SetValue action, located in ./include/Expressions/Actions/SetValueAction.php, is used to set the value of a field based on a formula.
The SugarLogic SetVisibility action, located in ./include/Expressions/Actions/VisibilityAction.php , is used to determine the visibility logic of a field based on a formula.