Salesforce Native APIs |
Absence validations
When Native API support is enabled for absence records, Sage People runs the following validations when absence records are created, updated, or deleted by the third-party integration:
-
Employment Record Id validations:
-
Employment Record Id cannot be edited
-
Employment Record Id is required to create an absence record
-
Employment Record Id must be valid in the org
-
-
Date validations
-
End Date is earlier than the Start Date
-
-
Parental leave record validations:
-
Mismatch between the value of Is Parental Leave in the absence record and Is Parental Leave in the absence accrual rule
-
-
Paid leave validations
-
Mismatch between the value of Paid in the absence record and Is Paid in the absence accrual rule
-
-
Pay code validations
-
Mismatch between the value of Pay Code between the absence accrual rule and the absence record
-
-
Absence reason validations
-
Reason cannot be edited
-
Reason cannot be empty in the request
-
Reason in the request does not match any of the reasons in the absence accrual rules available for the Employment Record linked to the Absence record and the reasons available in the Reason picklist
-
-
Record type validations
-
Record type cannot be empty in the request
-
Record type in the request is not valid
-
Record type cannot be changed
-
-
Required fields validations
-
Days/Hours, End Date, and Start Date are required for all requests
-
Days/Hours cannot be 0
-
If the request is for parental leave, Expected Arrival Date is required
-
-
Absence request state validations
-
If Approval Date has a value but Approved is not true
-
If Approval Date has a value and End Date Provisional is true
-
If Approved Date has a value and Rejected Date has a value
-
If Approved is true but the Approval Date is empty
-
If Approved is true but End Date Provisional is true
-
If Approved is true but Rejected Date has a value
-
If the record is for a vacation type absence, and Confirmed Date has a value
-
If Rejected Date has a value and Approval Date has a value
-
If Rejected Date has a value and Approved is true
-
When updating records:
-
Cannot empty the value of Rejected Date if it has a value before the update
-
Cannot empty the value of Confirmed Date if it has a value before the update
-
Cannot empty the value of Approval Date if it has a value before update
-
Cannot change the value of Rejected Date if it has a value before the update
-
Cannot change the value of Confirmed Date if it has a value before the update
-
Cannot change the value of Approved Date if it has a value before the update
-
Cannot change the value of Approved from true to false
-
Cannot change the value of End Date Provisional from false to true
-
If Approved is true, cannot set a value to Rejected Date
-
If Approved is true, cannot set a value to Confirmed Date
-
If the record is for a vacation type absence, cannot set a value to Confirmed Date
-
If Rejected Date has a value, cannot set a value to Confirmed Date
-
If Rejected Date has a value, cannot change the value of Approved from false to true
-
-
-
Non writeable fields when creating an absence record:
-
Absence Accrual Seniority
-
Alert Trigger
-
Calculated Length
-
MS365 Calendar Event Id
-
Evidence Trigger
-
End Date Provisional if the record is for a vacation type absence
-
Actual Arrival Date if the record is not for parental leave
-
Still Birth if the record is not for parental leave
-
Expected Arrival Date if the record is not for parental leave
-
Back to Work Interview Date if the record is not for an absence type absence
-
Back to Work Interview Required if the record is not an absence type absence and its value is true
-
Back to Work Interview Date if the value of Back To Work Interview Required is false or null
-
-
Non editable fields when updating an absence record:
-
Start Date
-
Absence Accrual Seniority
-
Alert Trigger
-
Calculated Length
-
Evidence Trigger
-
MS365 Calendar Event Id
-
MS365 Calendar Entry
-
End Date Provisional if the record is for a vacation type absence
-
End Date Provisional if the record is for an absence type absence and End Date Provisional is set to false before editing
-
End Date if the record is for an absence type absence and End Date Provisional is set to false before editing
-
Actual Arrival Date if the record is not for parental leave
-
Still Birth if the record is not for parental leave
-
Expected Arrival Date if the record is not for parental leave
-
Back to Work Interview Required if the record is not an absence type absence and its value is true
-
Back to Work Interview Date if the value of Back To Work Interview Required is false or null
-
-
Validations for the alert and block limits defined in the absence accrual seniority.
-
If a request hits an alert limit, the value of Alert Trigger is set to true and the absence record is created or updated. If an action event based on the Alert trigger is configured, an alert email notification is sent.
-
If a request hits a block limit, the record is not created or updated but the Block Message defined in the absence accrual rule is returned.
-
Any validation rules you have defined in your for specific fields are not affected by enabling or disabling Native API support.
Validations are not run if the fta.Disable Absence Validation custom permission is assigned to the user performing the action.