Introduction
In context with Absence Management Approval Workflow processes and configurations many times one way have a requirement where-in certain absence transactions needs to follow an alternative approval routing based on a Descriptive Flex-Field (DFF) enabled on the Absence Recording page. In this case the business requirement is such that whenever a specific Absence Booking Transaction makes the Absence Leave Balance as “Negative” then an alternative approval routing should be followed. Unfortunately, this cannot be achieved as the DFF attributes are not available while defining approval rules on the Absence Approval workflow.But having said so one can still have a workaround solution where they can make use of “Absence Reason” field.
In this post we would try to demonstrate the same with a worked-out example.
Pre-Requisites
In order to proceed with this approach, we need to make sure that there are some pre-existing setups in the system.
- Pre-Existing Active Absence Type
There should be a pre-existing absence type present in the system against which we can associate the newly created absence reason. For this example, we will choose the “Sick” absence type.
Worked-Out Example
We would need to do some configuration steps which are described below:
Creating a New Absence Reason
We would need to navigate to Setup and Maintenance -> Manage Absence Reasons-> Create New Reason
Associating Absence Reason to Absence Type
Next we would need to associate the absence plan with absence type.
Navigation: Setup and Maintenance->Manage Absence Type-> Search for “Sick” and add absence reason under “Plans and Reasons”
Enable Display Properties for Absence Reason
We would need to enable the “Reason” field under “Manage Absence Type” > Sick (Display Features)-> Primary Absence Details
Enabling Approval Processing for Administrator
As a next step we would also need to enable Approval processing for Administrator.
Navigation: Setup and Maintenance->Manage Absence Type-> Display Features-> Approvals and Processing Rules-> Approval Processing and Approval Reset on Update to Enabled for Administrator
Ensure Insufficient Balance Enforcement is Not Enabled Administrator
We would also need to ensure that “Insufficient Balance Enforcement” attribute is “Not Enabled” for Administrator.
Navigation: Setup and Maintenance->Manage Absence Type-> Display Features-> Projected Balances-> Insufficient Balance Enforcement to Not Enabled for Administrator
Configuring Custom Error Messages under “Manage Messages”
We would also need to create two new Custom Error Messages.
Navigation is Setup and Maintenance->Manage Messages -> Create New Messages
The first message is fired when an end-user chooses “Allow Negative Absence Booking” as an Absence Reason even when the current absence transaction does not take the Absence Leave Balance to a negative value. In this case the end-user has to choose another absence reason and re-submit the transaction
The second message gets fired when the current absence booking is about to make the Absence Leave Balance as negative but the Absence Reason chosen is not “Allow Negative Absence Booking”. In this case, end-user would be asked to choose “Allow Negative Absence Booking” and then re-submit the transaction.
Creating a Custom Global Absence Entry Validation Fast Formula
We would also need to create a custom Global Absence Entry Validation Fast Formula.
Navigation: Setup and Maintenance->Fast Formula->Create New Formula
Attaching XX_ANC_SICK_VAL to Sick Absence Type
We would need to attach “XX_ANC_SICK_VAL” Absence Entry Validation Fast Formula to “Sick” Absence Type
Configuring “Global Absence Recording” Transaction Workflow
Next, we would need to configure “Global Absence Recording” workflow.
Navigation: Setup and Maintenance -> Manage Approval Transactions for Human Capital Management-> Global Absence Recording
We need to configure two rules:
Rule: ApprovalReasonKeyForHT
IF (absencesApprovalsRequest.absenceTypeReasons != "Allow Negative Absence Booking") THEN “Management Hierarchy”
Rule: AllowOverBooking
IF (absencesApprovalsRequest.absenceTypeReasons == " Allow Negative Absence Booking") THEN “Self Auto Approve”
Verification
There is a positive balance value as on 01/02/2020 such that the current absence booking will not make the Absence Leave Balance negative. In this case, if we choose “Absence Reason” as “Allow Negative Absence Booking” and we should get an error.
Next, we will book and absence with any Absence Reason apart from “Allow Negative Absence Booking Routing” and we should get error.
Now if we change the Absence Reason to “Allow Negative Absence Booking” then we should be able to submit the absence
Once we are done with the Absence Recording we could check the status of the booked absences.
We could clearly see that based on the Äbsence Reason used one of the absence has got auto-approved while the other is still awaiting approval.
Summary
So, this is how we can use a combination of “Global Absence Entry Validation” Fast Formula and “Absence Reason” to ensure an alternative approval routing is enforced in case of Absence Overbooking.
Comments
database item or local variable HR_ASSIGNMENT_I D used as a context.
Any lead will be a big help.
Iam using the below formula
CHANGE_CONTEXTS (HR_ASSIGNMENT_I D = hr_id, PERSON_ID = person_id, EFFECTIVE_DATE= eff_date,LEGISL ATIVE_DATA_GROU P_ID = ln_leg_group_id)
(
ln_accrual_balance = GET_PLAN_BALANC E('Annual Leave Plan')
)
RSS feed for comments to this post