Unable to use Packages.com.glide.schedules.Schedule property
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2018 08:46 AM
Security restricted: Attempted access to restricted class name com.glide.schedules
Evaluator: java.lang.SecurityException: Illegal attempt to access class 'com.glide.schedules' via script Caused by error in script at line 3 1: var schedRec = new GlideRecord('cmn_schedule'); 2: schedRec.get('name', '8-5 weekdays'); ==> 3: var sched = new Packages.com.glide.schedules.Schedule(schedRec.sys_id);
- Labels:
-
Personal Developer Instance

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2018 08:55 AM
Usually, you would just use var sched = new GlideSchedule(schedRec.sys_id) now. the Packages calls should be phased out.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2018 09:18 AM
What do you mean ? You mean to say i shounld not use Packages calls ?
If i understand wrong can you please help me out with the syntax ? Just curios to understand does it required any property to be set or enabled ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2018 09:22 AM
Yes, Packages calls aren't used anymore, they were migrated to Glide objects. I put the replacement line of code in my initial response. GlideSchedule should be used instead of your package call.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-24-2018 03:46 PM
How about using the GlideSchedules the way the below way
var sched = new GlideSchedule();
sched.load('sys_id of the schedule'); //sys_id of the schedule used i.e. Mon - Fri