UI Action to create a calendar invite?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-03-2015 11:57 AM
Greetings-
As part of our deployment cycle I am required to send a meeting request to a shared calendar with the following specs:
- All Day Event
- Show time as free
- No alarm
- To: ServiceNow@regeneron.com
- From: logged in user
- Subject: ${change number} - {Change short description}
- Location: ServiceNow Production Instance
Sadly, I cannot seem to wrap my head around how to configure a meeting request notification. Can anyone out there help me?
Conan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2015 11:27 AM
I'll hold you to that, but I promise I'm not a stalker. BTW, what's your thought about this as the body of my UI action to call the event?
<code>
var t = g_form.getValue('u_migrated_to_production'); // let it be = 2013-07-24 19:42:24
var tt = t.split(' ');
gs.eventQueue("add.change.snow.calendar", current, tt[0], grTask);
</code>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2015 11:32 AM
You might have to remove the "-" character from the date as well. If so, this should do it:
gs.eventQueue("add.change.snow.calendar", current, tt[0].replace("-",""), grTask);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2015 11:46 AM
Weird, neither my code or yours is actually firing the event. Grrrr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2015 11:52 AM
, OK, wait a minute. The g_form is a client-side object, so you need to use:
var t = current.u_migrated_to_production.getDisplayValue();
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-19-2015 12:15 PM
Here's the current code:
var t = current.u_migrated_to_production.getDisplayValue(); // let it be = 2013-07-24 19:42:24
var tt = t.split(' ');
gs.log("CDL: tt0 - " + tt[0] + " tt1 - " + tt[1]);
gs.eventQueue("add.change.snow.calendar", current, tt[0].replace("-",""), grTask);
I checked my script log and I'm getting the right string but the event itself is not showing up in the log and the email never fires.