Summary

Sam asked how to fix a Salesforce PTO approval block for Amy Jones and whether Jennifer Hubbard can be given override capability going forward.

What was accomplished

Live Salesforce/Litify was checked through LITIFY_ORG. Amy's request record is Time_Off_Request__c a4RUV000004NGwD2AW, name Amy J-OOO, employee Amy Jones, 2026-05-14 1:30 PM to 5:30 PM ET, Required_PTO__c = 0.5, currently Pending.

The visible error is caused by the Apex PTO policy trigger, not by a simple UI mistake. The trigger recalculates Is_Unscheduled_PTO__c and Unscheduled_PTO_Override__c on every save. It uses the request record CreatedDate as the submitted time. Amy's replacement record was created on 2026-05-13 at 3:13 PM ET, less than 48 business hours before the PTO start, so the system treats the replacement as unscheduled even if the original request was timely.

Amy's employee record currently shows Unscheduled_PTO_Allowed__c = 9, Unscheduled_PTO_Used_YTD__c = 10, Unscheduled_PTO_Remaining__c = 0, and Unscheduled_PTO_Over_Limit__c = true. Because she is already over the cap, the trigger blocks any new approval that it classifies as unscheduled.

A prechange snapshot was saved locally at admin/session_logs/pto-amy-jones-2026-05-18/prechange-a4RUV000004NGwD2AW.csv. An attempted one-step correction was rejected by Salesforce with the same unscheduled allowance error. A second attempt to save only scheduled/override values reported success, but the trigger recalculated the values back to unscheduled/null. Production state remains pending and blocked.

Jennifer Hubbard was verified as the intended user: Salesforce user 005UV0000065KSTYA2, username/email jhubbard@demandsam.com, active profile Litify Standard User.

The existing permission set PTO_Unscheduled_Tracking_Access was inspected. It is read-only for unscheduled tracking fields and is assigned only to Sam. It is not an override permission and would not let Jennifer fix Amy's record.

Recommendation

Do not simply make all unscheduled balances go negative and remove the block globally. That would make reporting more honest, but it would also allow every over-cap unscheduled request to be approved without an intentional correction step.

The better fix is a controlled PTO admin override lane:

  1. Add an admin-only field such as PTO_Submitted_At_Override__c or Original_Submitted_At__c on Time_Off_Request__c.
  2. Create a permission set such as PTO_Admin_Override and assign it to Jennifer Hubbard.
  3. Update TimeOffRequestPolicyService.resolveSubmittedAt() so it uses the override timestamp when present and authorized, otherwise falls back to CreatedDate.
  4. Add a required override reason field if the team wants a clearer audit trail.
  5. Optionally change remaining-unscheduled formulas to show negative values for visibility, while keeping the approval block unless an authorized override is present.
  6. Deploy with the PTO Apex test class, then enter Amy's original submitted timestamp and approve her request.

Suggested message to Jennifer

Jenni, the current PTO system treats deleted and re-entered requests as new submissions. That can make a request look unscheduled even if the original request was on time. For now, please do not delete and re-enter PTO requests to correct them. If one was entered on time but has to be corrected, send Sam or the admin team the record link and the original submitted date/time. We are adding an admin-only override so you can enter the original submitted time, keep the request classified as scheduled, and then approve it with a clean audit trail.