Configure a lifecycle event activity set
Create or modify a lifecycle event activity set to define a container for a group of activities.
Before you begin
Role required: sn_hr_le.admin or sn_hr_le.activity_set_manager
Activity sets represent different stages in the lifecycle event process, and you must define when the activity set is triggered, such as immediately upon creation of the lifecycle event case or after the completion of another activity set. Each activity set is associated with a single lifecycle event.
Procedure
Advanced trigger script
- Trigger type = advanced.
- The new hire (Subject Person) has an assigned manager.
- The start date for the new hire has been reached (cannot be empty).
- Two specific activity sets have completed.
(function shouldActivitySetTrigger(parentCase /* GlideRecord for parent case */,
hrTriggerUtil /* hr_TriggerUtil script include instance */) {
//Check that employee has a manager
var employeelocationType = parentCase.subject_person.manager;
if (gs.nil(employeeLocationType))
return false;
//Check that the employees start date is populated and on or before today
var employeeStartDate = parentCase.subject_person_hr_profile.employment_start_date;
if (gs.nil(employeeStartDate) || !hrTriggerUtil.checkForElapsedDate(employeeStartDate.getDisplayValue()))
return false;
//Check Previous Sets have finished
var prerequisiteActivitySetIds = ['20f71984ecb61300964fb378c827556f', '58123661dbf2930085ea54c0cf9619ba'];
if (!hrTriggerUtil.checkActivitySetsCompleted(prerequisiteActivitySetIds))
return false;
return true;
})(parentCase, hrTriggerUtil);Replace the sys_ids in the example with your
activity set sys_ids. From your activity set, click the Form Context
Menu icon and select Copy sys_id.