Auto Populate Scheduled Start Time and End Time in Change Request

Auto Populate Scheduled Start Time and End Time in Change Request

We can now auto-populate the Scheduled Start Time and End Time in a change request using FAFR.

Under Admin>Change Template>Field and Form Rules, you can use the below scrips 

Scheduled Start Time 

var x=$CS.getValue("SCHEDULEDSTARTTIME");

if ( x === undefined)

{    

$CS.setValue("SCHEDULEDSTARTTIME",new Date());  


Scheduled End Time

var x=$CS.getValue("SCHEDULEDSTARTTIME");

if ( x === undefined)

{    

$CS.setValue("SCHEDULEDSTARTTIME",new Date());  

x=$CS.getValue("SCHEDULEDSTARTTIME");
$CS.setValue("SCHEDULEDENDTIME",x);

/* set days and hours from the current date*/
/* Date Field */
var fieldName='SCHEDULEDENDTIME';
/* you can choose the value 0 to 27 days*/
var nextDay=7;
/* you can choose the value 0 to 23 hours*/
var nextHour=0;
$CS.setDateFromCurrentDate(fieldName,nextDay,nextHour); 

                  New to ADSelfService Plus?

                    • Related Articles

                    • Custom Module-Based Dependent Fields with FAFR

                      In the dynamic world of IT service management, form simplicity and accuracy play a major role in how smoothly requests are handled. However, many organizations face a recurring challenge—dependent field limitations within ServiceDesk Plus. Currently, ...
                    • Update schedule start and end time for a change request

                      Requirement: When a Change request is submitted, the schedule start date must be set to current date and completion date to be set 10days after the current date  This must be reflected in the created change request. Steps to follow: Goto Admin > ...
                    • Change Auto closure

                      This will be helpful in auto closing change request after X days it is in review stage. This use case is more suitable in environments where ONLY Requesters (customers) are the Change Reviewers and they want the Change to be closed if no review is ...
                    • Script to auto-populate the "Estimated Efforts" of a task based on the "Category" and "Sub-Category" of an incident request

                      REQUIREMENT: When an incident request is created, a task should be automatically added to the request. In the created task, the "Estimated Efforts" field should be automatically calculated based on the Category and Sub-Category of the incident ...
                    • Script to Populate User Additional Field under Incident Template using FAFR

                      The script load the Requester Name under Incident Additional field ( As a pick list), by choosing the requester name under additional field the script populates the user additional field value. * Kindly create two additional fields under Admin -> ...