User Story
As a Salesforce user,
I want a Screen Flow to submit leave requests by selecting the leave type, providing start and end dates, and ensuring validation,
So that I can efficiently log and track my time off without errors or overlaps.
Acceptance Criteria:
-
Leave Type Selection:
- The flow should start with a screen to select the type of leave from the following options:
-
Date Input Fields:
- Include fields to capture the Start Date and End Date of the leave.
- Ensure the input fields are user-friendly and properly labeled.
-
Validation Logic:
- Ensure that the End Date is not earlier than the Start Date.
- Validate that the requested leave does not overlap with any existing leave requests for the same user.
- Display an error message if validation fails, with clear guidance to the user.
-
Record Creation:
- Upon successful validation, save the leave request as a record in a custom object named Time_Off_Request__c.
- Map the following fields to the record:
- Leave Type
- Start Date
- End Date
- User ID (or related user information)
-
Confirmation Screen:
- Display a confirmation message after the request is saved, including a summary of the leave request details.