on 2024 Aug 07 9:49 PM
Hi Experts,
Currently whenever we hire a contingent worker as Work Order is created for the first time, we generate Work Order ID and save it via business rule (onSave rule under Work Order). It simply checks if Work Order ID field is blank, if yes generate a Work Order ID based off a sequence. We have kept Work Order ID field as read only.
Now when we try to rehire the same Contingent Worker , as Work Order ID already exists for the employee , NO new Work Order is created and system keeps the same old Work Order ID and updates it.
To force system to generate a new Work Order ID for Rehire Contingent Worker I tried to enhance our existing business rule by adding some conditions around Rehire Contingent Worker Event Reason so that new Work Order ID gets generated for Rehired Contingent Worker cases. It did generate a new Work Order ID.
But this opens another issue – Post Rehiring of Contingent Worker whenever we try to edit a Work Order detail like Start \ End Date etc under Contingent Worker Information portlet, our enhanced rule will again run and as business rule’s new condition is true for Rehire Contingent Worker Event Reason , another new Work Order ID will be generated for same employee overwriting earlier Work Order ID.
Is there any way I can apply logic in the business rule so that New Work Order only gets created when we rehire Contingent worker and NOT when we try to edit any Work Order information under Contingent Worker Information portlet post Rehiring of Contingent Worker?
Appreciate everyone's inputs
Hi @Sunny_T
You can use the Rule Context and make it only applicable for Hire/Rehire scenario and not on Edit UI or Edit History.
Please mark this answer as Accepted Solution in case your query is resolved.
Thanks
Manish
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
5 | |
4 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.