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.

ui action

Vedavalli
Kilo Sage

I have a a button which creating a record in task table when i click on publish button.
but the requirement is if today is start date and end date is 16 so when I click on publish then it should create 6 tasks in task table how it is possible?

5 REPLIES 5

Neetu2000
Tera Contributor

Hello @Vedavalli 
 if datediff function is showing error then try using below method instead of line 3

 var numberOfDays = GlideDate.subtract(startDate,endDate);