A consultant is designing a business rule to calculate an employee's bonus eligibility based on their hire date and employment type. The rule must trigger when either the hire date or employment type changes in Job Information. Which rule scenario and trigger should be used to ensure the rule evaluates both fields?
Trap 1: OnInit rule on Job Information
OnInit rules run when the Job Information portlet is loaded. They do not react to field changes. They are used for setting default values or controlling UI behavior on load. Since the rule must evaluate when Hire Date or Employment Type changes, OnInit is not suitable.
Trap 2: OnPostSave rule on Job Information
OnPostSave rules execute after the Job Information record is saved. They cannot modify the record or provide real-time calculations based on field changes. They are typically used for integrations or notifications. Thus, they do not meet the requirement of triggering on field changes.
Trap 3: OnSave rule on Job Information
An OnSave rule triggers only when the Job Information record is saved, not when individual fields change. If the user changes Hire Date and then saves, the rule runs, but it does not provide immediate feedback or trigger on field change. The requirement specifies triggering when either field changes, which suggests immediate evaluation.
- A
OnInit rule on Job Information
Why it fails: OnInit rules run when the Job Information portlet is loaded. They do not react to field changes. They are used for setting default values or controlling UI behavior on load. Since the rule must evaluate when Hire Date or Employment Type changes, OnInit is not suitable.
- B
OnPostSave rule on Job Information
Why it fails: OnPostSave rules execute after the Job Information record is saved. They cannot modify the record or provide real-time calculations based on field changes. They are typically used for integrations or notifications. Thus, they do not meet the requirement of triggering on field changes.
- C
OnChange rule on Job Information with trigger fields Hire Date and Employment Type
An OnChange rule on Job Information can be configured with multiple trigger fields. When either Hire Date or Employment Type changes, the rule fires and recalculates bonus eligibility. This ensures both fields are monitored and the rule executes appropriately.
- D
OnSave rule on Job Information
Why it fails: An OnSave rule triggers only when the Job Information record is saved, not when individual fields change. If the user changes Hire Date and then saves, the rule runs, but it does not provide immediate feedback or trigger on field change. The requirement specifies triggering when either field changes, which suggests immediate evaluation.