How do I set up an activity set in a lifecycle event to trigger based on a specific date?

AUT HR Tech Tea
Giga Contributor

Hi all,


I'm looking to set up activity sets in a lifecycle event to trigger on a specific date.

As an example, we have staff in the organisation that will apply for promotion using a HR catalog item which will then trigger the lifecycle event.

For each activity set, all staff will see the next activity set trigger on the same date.

Is this possible? If it requires some scripting using the 'Advanced' option in the activity set, some examples would be appreciated.

Thanks!

1 ACCEPTED SOLUTION

Sean Antle
Giga Guru

The way to get an activity to trigger on a certain date, is to put it in an Activity Set that uses a date-based trigger.

You may also be able to try using a Flow activity type.

View solution in original post

6 REPLIES 6

suvro
Mega Sage
Mega Sage

Hi Vimal,

 

You can explore and use 

gs.eventSchedule();

umaaggarwal
Giga Guru
Giga Guru

Hi Vimal,

 

Please try 

gs.eventQueueScheduled(String name, Object instance, String parm1, String parm2, Object expiration)

 

Last parameter is the date/time when you want to trigger this event. you can either give specific or any dynamic date there .

 

Please mark this correct and helpful if it helps.

Regards!

Uma

Christian Prob2
Tera Guru
Hi, I don't think gs.eventSchedule will here - isn't that for system events and not for lifecycle one? Anyways I'm not sure I understand your requirement : where do you get the date from "all staff should see the next activity at"?

Hi Christian,

Good point, I do need to get the date from somewhere in ServiceNow. I was initially hoping a script may assist without requiring a specific date field within a case.

I realised a couple of hours after I posted this question, I did find a solution which does require creating specific date fields in a HR case which will auto populate the dates after each case in created (i.e. when a staff applies for a promotion).

find_real_file.png


The dates are auto-populated using the HR template within the HR service using a criteria.

find_real_file.png

So I have the solution I need to ensure I can trigger each activity set based on the date.

find_real_file.png