The CreatorCon Call for Content is officially open! Get started here.

Help with workflow waiting for date to be reached

Blair5
Tera Guru

I'm having some difficultly with what solution to use for following requirement:

User fills out catalog form and chooses a date. Another date is auto-populated with date 8 months in the future. Once submitted and tasks completed, there should be a timer or a wait activity (??) that will send an email 2 weeks before date is met (and again 1 week before date). 

Not sure how to do this - I set a timer and added this code. But does it keep checking? : 

var difSeconds = gs.dateDiff(gs.nowDateTime(), current.variables.return_date.getDisplayValue(), true); 

gs.log('seconds: '+difSeconds);


if(difSeconds == 1209600){
	answer = true;
}
1 ACCEPTED SOLUTION

DirkRedeker
Mega Sage

Hi

There was a similar question recently, which I answered in detail at the following URL:

https://community.servicenow.com/community?id=community_question&sys_id=1f8449aadb1adc5066f1d9d96896...

This is using the Workflow and is quite simple to achieve. You can just give it a shot, instead of writing your Scheduler.

Let me know if that answers your question and mark my answer as correct and helpful.

Enjoy & BR

Dirk

 

 

View solution in original post

6 REPLIES 6

DirkRedeker
Mega Sage

Hi

There was a similar question recently, which I answered in detail at the following URL:

https://community.servicenow.com/community?id=community_question&sys_id=1f8449aadb1adc5066f1d9d96896...

This is using the Workflow and is quite simple to achieve. You can just give it a shot, instead of writing your Scheduler.

Let me know if that answers your question and mark my answer as correct and helpful.

Enjoy & BR

Dirk

 

 

Hi Dirk - Thank you. The link you sent is helpful.