Salesforce Flow Reactivity: A Workaround for Date Field Limitations 🔮🪄
- Jessica Mills

- Aug 30
- 2 min read
Salesforce's flow reactivity is a powerful new feature, but it comes with certain limitations, particularly when referencing date fields in formulas to dynamically display text inputs. This post outlines a workaround to address this challenge.
Business Scenario: Streamlining HR Time-Off Requests
XYZ Solutions uses Salesforce for HR processes. Jenna, an HR manager, needs a formal intake process for time-off requests, including validations for vacation, sick days, and travel & expense requests.
Key requirements for vacation requests:
Must be submitted at least 14 business days before the start date
Cannot exceed 10 business days in length
Exceptions are allowed for family emergencies and other extenuating circustances
Building the Flow: A Step-by-Step Guide
Due to limitations in reactive screen components,dates cannot be reactively calculated in formulas for conditional visibility for text inputs. The following details a workaround to meet the business scenario requirements.
Step 1: Enable Flow Reactivity
For flow versions under API version 59, ensure reactivity is enabled. Navigate to process automation settings and check the corresponding box.

Step 2: Configure Flow Elements

Add Screen Components:
Vacation Time Off Requirements Checkbox: This acts as a placeholder and is crucial for the reactivity workaround.

Default Value Formula: The default value of this checkbox is determined by a formula that verifies if the start and end dates meet the specified parameters.

Conditional Visibility: The text input field and file input component are only visible when the "Vacation Time Off Requirements" checkbox is checked.

Step 3: Testing
Test 1: Verify that vacation requests with dates within the parameters are allowed, and that the parameters are only applied to vacation requests.
Test 2: Confirm that requests exceeding 10 days are flagged, and that the field reactively recalculates if the employee adjusts the duration to under 10 days.
Test 3: Ensure that requests longer than 2 weeks are flagged, and that the field reactively recalculates if the employee adjusts the duration to under 10 days.
Potential Enhancements
Future enhancements for this flow could include:
Excluding holidays from business day calculations.
Integrating business hours requested and remaining.
.png)

Comments