Activity set trigger based on fields in the parent case

Suvetha S
Tera Contributor

Hi All,

We want Lifecycle activity sets to trigger when the parent case is moved to "Work in progess" by the fulfiller and based on the variables selected. For ex, only  if variable 1 is X, variable 2 is Y and State changes to work in progress, corresponding LE Activity should get trigger. 

4 REPLIES 4

Community Alums
Not applicable

Hi @Suvetha S ,

Am confused !!

What do you mean by Variables here?

For a LE to trigger you need a HR service and for a HR case, you just need the Name of the Employee.

It was supposed to be field. HR Case has two dropdown  fields. Say Application 1 and Application2. If Application1 has choice  HR  has Application2 has choice Payroll & when the fulfiller selects Work in progress then an employee form should get trigger. 

Community Alums
Not applicable

Can you share some Screenshots

@Community Alums 

SuvethaS_0-1666343216892.png

these are the 2 variables we got from Record producer. So when the state of the Parent case changes to Work in progress LE activity should trigger to the employee. I have written a Trigger condition as below which is not working.

(function shouldActivitySetTrigger(parentCase /* GlideRecord for parent case */ ,
hrTriggerUtil /* hr_TriggerUtil script include instance */ ) {
if(parentCase.state=='18')
{
var payloadObj = new global.JSON.parse(parentCase.payload);
if (payloadObj.application_category == 'Recruitment' && payloadObj.application == 'Qualtrics') {

return true;
}
}

})(parentCase, hrTriggerUtil);