[Orlando] Introduced script sandboxing in Scheduled Reports. Glide classes such as GlideDate, GlideTime and GlideDateTime, as well as script functions are no longer working in a conditional script.DescriptionIn Orlando, Glide classes such as GlideDate, GlideTime, GlideDateTime and GlideSchedule, are no longer working as a conditional script in a Scheduled Report. Script functions are also no longer working, where the same conditional script works as expected in New York. We have introduced Script Sandboxing with the conditional script in Scheduled Reports, as a protection mechanism in Orlando. For further information on Script Sandboxing, please review KB0550837: Script sandboxing remediation.Steps to Reproduce 1. Log into an Orlando instance2. Create a new Scheduled Report: Choose anything you want for the following fields: Name Report, Users, Groups, Run, Time, Subject, Introductory MessageConditional = trueCondition (script) as follows - // This condition should cause the scheduled report to only run on a weekday (Mon - Fri)var today = new GlideDate();answer = (today.getDayOfWeekUTC() < 6); 3. Save the Scheduled Report, and then click on the Execute Now button4. Open System Log > Warnings, and observe the following message - org.mozilla.javascript.EcmaError: "GlideDate" is not defined.Caused by error in sysauto_report.2b13420ddbc41c1013c09207db961959.condition at line 1==> 1: var today = new GlideDate();2: answer = (today.getDayOfWeekUTC() < 6); If you perform the same steps above in a New York instance, no errors are observed and the conditional script is executed as expected.WorkaroundTo use date/time methods in your conditional script, for example, to send the Scheduled Report on specific days, you can use the JavaScript Date class instead of the GlideDate class. Using the JavaScript Date class, the following conditional script will send the report every weekday - Note: The numbers for the days of the week in the JavaScript Date class are dependent on your timezone, so this will need to be confirmed on your own instance. // This condition should cause the scheduled report to only run on a weekday (Mon - Fri)// 0=Sunday,1=Monday,2=Tuesday,3=Wednesday,4=Thursday,5=Friday,6=Saturdayvar d = new Date();dayOfWeek = d.getDay();if(dayOfWeek > 0 && dayOfWeek < 6) {answer = true;}else {answer = false;} The following conditional script will send the report on Tuesday, Wednesday and Friday, as follows - // This condition should cause the scheduled report to only run on a Tue, Wed and Fri)// 0=Sunday,1=Monday,2=Tuesday,3=Wednesday,4=Thursday,5=Friday,6=Saturdayvar d = new Date();dayOfWeek = d.getDay();if(dayOfWeek == 2 || dayOfWeek == 3 || dayOfWeek == 5) {answer = true;}else {answer = false;} If the conditional script on a Scheduled Report is more complex and you need to make use of our Glide classes, then please use the following steps as a workaround - 1. Create a Scheduled Job and complete all the conditional logic of the Scheduled Report inside the Schedule Job. 2. If all the conditional logic is satisfied, you can trigger the Scheduled Report with the following script inside the Scheduled Job. var schRpGr = new GlideRecord("sysauto_report");schRpGr.get("<sys_id of the scheduled report>");gs.executeNow(schRpGr);Related Problem: PRB1396133