Business Rule to change Request Status back to WIP if updated by certain Assignment Group

aguanci
Tera Expert

Hi All,

 

In our Pre-Boarding process we use Lifecycle Event Case and a custom case Table named OHS Case. The OHS case is the child case to the Lifecycle Event case. When a Lifecycle event case is completed, the OHS case is moved to Withdrawn automatically. On the OHS case table we store the Assigned to user for the LifeCycle Event Case (Assigned TAC) and the Updated by user. We solved for this issue by creating a Business rule that flips the OHS case back to WIP if the Assigned To of the Lifecycle case is the last to close and update on the Lifecycle Event case:

 

var gr =  new GlideRecord('x_phhr_ohs_ohs_case');
    gr.addQuery('state=7^sys_updated_bySAMEASu_assigned_tac.user_name^full_dateISEMPTY');
    gr.query();
    while (gr.next()) {
        gr.state = 18;  //State = WIP
        gr.update();
        }
 
We are now running into the issue of other users besides the assigned to TAC updating the Lifecycle Case, which leaves the OHS Case in Withdrawn. We need a way to flip the OHS case back to WIP if any user in the TA Coordinators Assignment Group updates the LCE case.
 
1 REPLY 1

SNUG AM
Giga Guru

 Hi aguanci, 

 

Issue can be addressed by updating BR conditions adding additional conditions like updated user isMember of the TA Coordinators Assignment Group.

 

Regards, 

Anand M.