- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2019 12:09 PM
I am working on service catalog , Once user request an item in the catalog and it has go through the approval process .
Once the request is approved then a calendar has to create about schedule to pick up in the users calendar and the technician calendar .
How to achieve this ?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-18-2019 10:03 AM
Hi ragz,
In your Workflow, after the approval, I would create a "Run Script" activity that we will create the calendar events in.
The calendar events exist in the following table: user_calendar_event
So we'll create two new records on that table using the GlideRecord API in our Run Script activity. I'm assuming the User, Technician, and Start and End Date of the appointment are variables in your Catalog Item? Let's pretend like they are for this example and call the variables "user", "technician", "start_date", and "end_date".
The code would look something like this then, but you'll have to replace the variable names and any of the other fields you'd like to change to fit your process.
var user = new GlideRecord('user_calendar_event');
user.newRecord();
user.user = current.variables.user;
user.name = 'Technician Appointment';
user.type = 'task_work';
user.task = current.getUniqueValue();
user.start_date_time = current.variables.start_date;
user.end_date_time = current.variables.end_date;
user.insert();
var tech = new GlideRecord('user_calendar_event');
tech.newRecord();
tech.user = current.variables.technician;
tech.name = 'Technician Appointment';
tech.type = 'task_work';
tech.task = current.getUniqueValue();
tech.start_date_time = current.variables.start_date;
tech.end_date_time = current.variables.end_date;
tech.insert();
You can read more about GlideRecord API here: GlideRecord API
Thanks!
Josh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-13-2020 08:31 AM
Hi Josh,
I do not see this table anywhere "user_calendar_event" has this table been deprecated?
Thanks,
-Erik

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-10-2022 01:37 PM
In case anyone comes across this in the future as I did, the user_calendar_event table is included with Resource Management and does not appear to be a part of the standard Now platform.