UI Action to create a calendar invite?

conanlloyd
Giga Guru

Greetings-

As part of our deployment cycle I am required to send a meeting request to a shared calendar with the following specs:

  1. All Day Event
  2. Show time as free
  3. No alarm
  4. To: ServiceNow@regeneron.com
  5. From: logged in user
  6. Subject: ${change number} - {Change short description}
  7. 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

12 REPLIES 12

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>


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);


Weird, neither my code or yours is actually firing the event. Grrrr


, 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();


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.