You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calculate Due date using user defined schedules (#1894)
* Create Code.js
* Create README.md
* Add Business rule: Add or remove tag to the ticket
* Rename code.js to code.js
* Rename README.md to README.md
* Adding new UI Action: Generate PDF
* Adding new UI Action: Generate PDF
* Adding new Background script: Bulk Update of Fulfillment Group References in Published KB Articles
* Adding new Background script: Bulk Update of Fulfillment Group References in Published KB Articles
* Delete Server-Side Components/Background Scripts/Bulk Update of Fulfillment Group References in Published KB Articles directory
* Update Script.js
* Update README.md
* Update README.md
* Delete Client-Side Components/UI Actions/Generate PDF directory
* Create script.js
* Create README.md
* Create script.js
* Create README.md
* Delete Server-Side Components/Script Includes/Calculate Due date using user defined schedules directory
* Create README.md
* Add files via upload
* Update script.js
* Update README.md
This Script Include calculates a future due date by adding a specified number of business days to a given start date, based on a defined schedule.
3
+
This can be used anywhere within the server side scripts like fix scripts, background scripts, UI Action (server script).
4
+
5
+
**Pre-requisite:**
6
+
A schedule record with valid schedule entries should be created in the cmn_schedule table
7
+
A business hours value per day need to be configured
8
+
In this sample, the business hours per day is configured as 8 hours i.e 9AM - 5PM.
9
+
10
+
**Sample:**
11
+
var daysToAdd = 4; // No of days need to be added
12
+
var script = new CaclculateDueDate().calculateDueDate(new GlideDateTime(),daysToAdd); // Passing the current date and daysToAdd value to script include
0 commit comments