Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Business Rule

Shrabanti
Tera Contributor

Hello,
What script need to Set up a business rule that sends a notification to the Approver in every 3 working days.

13 REPLIES 13

Dhananjay Pawar
Kilo Sage

Hi,

Instead BR you can go with Scheduled Job to achieve this.

Is there any specific reason for BR?

 

Thanks.

hello @Dhananjay Pawar 
it's a user recruitment to process with business rule. 

dgarad
Giga Sage

Hi @Shrabanti 

 

please refer to below script

 

var today = new GlideDateTime();
var dur = new GlideDuration(60*60*24*1000*3);

var sch= new GlideSchedule('36a0629197010210b958f84de053afaa'); //Schedule sys id
var businessDay= sch.add(today,dur);
gs.info(businessDay);

gs.eventQueueScheduled("<name_of_your_event>", current, "", "", businessDay);

Thanks

If my answer finds you well, helpful, and related to the question asked. Please mark it as correct and helpful.

Thanks
dgarad

Shrabanti
Tera Contributor

Hello @dgarad 
can u please tell that what are the conditions need to add  in business rule before that script u provided.
scheduled sys id means?