Issue sending "Meeting Invitation" from ServiceNow - Change

jimnicholson
Giga Guru

Hello Community

Still relatively new to SNow (I'll play this card for the next few years if I can), and have run across something that has really stumped me and I can't for the life of me figure it out.

We have a mandatory call for every change that goes through, to review change records for that day and the submitter needs to attend and let everyone know that they are ready to deploy the change.   The call happens the day of the change at 8:30 AM.   I created two new fields on the change form (u_ipcm_call_scheduled and u_ipcm_call_end)   I then have an business rule that runs when the state changes to "IPCM Review" to populate these two fields. This business rule basically grabs the start date of the change, and then splits the date and time, uses the date portion along with statically setting the time to 8:30 and 9:00 of the scheduled change date for call start and end time.

Here is the script the Business Rule is running:

function onBefore(current, previous) {

       

            var dateSection = current.start_date.split(' ')[0]; //Gets the Date

            var timeSection = current.start_date.split(' ')[1]; //Gets the Time

         

//Set the value of the Date field with the date from the Date/Time field

 

  var gdt1 = new GlideDateTime(dateSection + ' 08:30:00 AM');

  var gdt2 = new GlideDateTime(dateSection + ' 09:00:00 AM');

  current.u_ipcm_call_scheduled = gdt1;

  current.u_ipcm_call_end = gdt2;

}

So the field(s) appear to be populating properly, the date/time format looks good.   The notifications are triggered just fine, and the meeting invite has everything in the proper locations (location, start time / end time, etc...)

The issue I am having, is lets say the fields populated for 01/07/2015 08:30:00 AM and the end is 01/07/2015 09:00:00 AM, when I receive the meeting invite, the start and end times are exactly the same, and the times are not what is in the fields I populate.   For the example above, I'll receive a meeting invite for a start and end time of like 11:27 AM or some odd random time, and my invite says "This was created in a different time zone, the times have been adjusted"

I have tried shutting off the "Append timezone to dates and times in sent mail" setting in email properties, this didn't make a difference.   My time zone setting at the system level under system properties -->general are set to US\Eastern, which is correct for where I am.   I'm at a loss here, I suspect it may be related to how I am putting the time element in the two gdt variables, but I'm not sure.

Any help would be greatly appreciated.

Thank you,

Jim

1 ACCEPTED SOLUTION

jimnicholson
Giga Guru

Hi All,



Update from ServiceNow Support.   This is apparently a known issue, PRB614409.   I deactivated the OOB map and created a custom one, but regardless of the active flag, the system is still processing using the original OOB map.   Looks like the workaround, if you have a custom map where one already exists OOB, is either to edit the OOB map to your liking, OR, delete the out of the box one.   I am in the process of testing this right now, I'll follow up with my testing results.




Hello Jim,



I apologize for the delay in getting back to you.



This is a known problem and I have associated the problem with this


incident, PRB614409.



I confirmed this as follows:I created a new change request, CHG0030778 on the dev instance



There are 2 sys_impex_map for icalendar.change_request



You have deactivated the default out of the box one, which has the following mappings:start_date dtstartend_date dtend



If you look at the notification that got triggered



The Calendar invite in the notification has:DTSTART:20160122T004959Z DTEND:20160123T005003Z



which correspond to the start_date and the end_date of the Change,


CHG0030778:<start_date>2016-01-22 00:49:59</start_date><end_date>2016-01-23 00:50:03</end_date>



So the system was looking for the first impex map it could find for


icalendar and using that one even though it is de-activated . So every time it


was grabbing the field map that was set in the out-of-box version and ignoring


your custom one.



Some workarounds you may want to do to adjust for this: - You might want to edit the field maps on the out of box impex map.- or you may want to just *delete* the out of box impex map   if you know you won't use it.



I will go ahead and Solution Propose the incident. Please test and


confirm after implementing either of the workarounds.




					
				
			
			
				
			
			
				
			
			
				

View solution in original post

12 REPLIES 12

Bizarre, indeed. Everything looks like it's set correctly to pull the values from those fields.



I think as a sanity check, I'd look first at the values of your two date/time fields in the Change Request's XML. For us, viewing the XML shows them converted to GMT. If they don't look like they represent the dates you see on the form (but converted to GMT), then the problem is somewhere there. You may need ServiceNow to help with that.



Then I'd look at the iCalendar notification record and verify that the start and end dates there match the values in your two fields. I would either look for the iCalendar notification in the Activity log on your Change Request record if email is being captured in the Activity log, or at the notification record in ServiceNow's Sent mailbox. If you have to go to the Sent mailbox, on the notification the iCalendar fields sould be visible in the Body Text field (body_text) of the record; you may need to add that field to the form for your notification record or view the XML of the record. If they don't seem to match what's in the Change Request, then it looks like either the Import/Export mapping or something deeper isn't working correctly. You may need ServiceNow to help troubleshoot that.



If the date-times on the iCalendar record match the date-times on the Change Request record, but Outlook is displaying something different, then the problem may be with something in your Exchange environment or Outlook. ServiceNow may not be able to help with that.



In any case - it's a strange issue. Let us know what you find.


OK, so I can't thank you enough for the troubleshooting advice, I was getting really frustrated not being able to see the actual calendar invitation in the sent message, but adding that body text field helped a ton!



So, I looked at the XML of the record, all is good there:



Change record XML:




<u_ipcm_call_end>2016-01-01 09:00:00</u_ipcm_call_end>


<u_ipcm_call_scheduled>2016-01-01 08:30:00</u_ipcm_call_scheduled>



But viewing the body text of the email, something is definitely off here:



DTSTART:20160114T153609Z


DTEND:20160115T153612Z



So something is definitely up with transforming these dates into the invite, and I'm not going insane.   I'll submit a ticket with ServiceNow, see if they can get to the bottom of this for me.  



Thank you again for your help, and I will be sure to follow up with an resolution so readers that may run across this issue have an idea if what to look for.


Any updates from SN support, Jim?   I'm having a similar issue.   I'm on Fuji patch 10.


Hi Amy,



Still nothing back from Support.   I opened the ticket on 01/08, still no response other than the canned "I have your ticket" notification.   I sent a follow-up on 01/11, and then called today to have it escalated/reassigned.   Hoping something comes soon, I'm stuck at this point.   I'll be sure to update this when I have an answer.


jimnicholson
Giga Guru

Hi All,



Update from ServiceNow Support.   This is apparently a known issue, PRB614409.   I deactivated the OOB map and created a custom one, but regardless of the active flag, the system is still processing using the original OOB map.   Looks like the workaround, if you have a custom map where one already exists OOB, is either to edit the OOB map to your liking, OR, delete the out of the box one.   I am in the process of testing this right now, I'll follow up with my testing results.




Hello Jim,



I apologize for the delay in getting back to you.



This is a known problem and I have associated the problem with this


incident, PRB614409.



I confirmed this as follows:I created a new change request, CHG0030778 on the dev instance



There are 2 sys_impex_map for icalendar.change_request



You have deactivated the default out of the box one, which has the following mappings:start_date dtstartend_date dtend



If you look at the notification that got triggered



The Calendar invite in the notification has:DTSTART:20160122T004959Z DTEND:20160123T005003Z



which correspond to the start_date and the end_date of the Change,


CHG0030778:<start_date>2016-01-22 00:49:59</start_date><end_date>2016-01-23 00:50:03</end_date>



So the system was looking for the first impex map it could find for


icalendar and using that one even though it is de-activated . So every time it


was grabbing the field map that was set in the out-of-box version and ignoring


your custom one.



Some workarounds you may want to do to adjust for this: - You might want to edit the field maps on the out of box impex map.- or you may want to just *delete* the out of box impex map   if you know you won't use it.



I will go ahead and Solution Propose the incident. Please test and


confirm after implementing either of the workarounds.