DTSTART and DTEND variables values for iCalendar Notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-13-2022 06:37 AM - edited ‎10-13-2022 06:38 AM
Hello!
I'm facing some issues while trying to send Meeting Invitations from ServiceNow.
I followed this document to set everything up:
https://docs.servicenow.com/bundle/sandiego-servicenow-platform/page/administer/notification/task/t_...
And I followed this external article aswell for some additional information and troubleshooting issues.
https://sites.google.com/site/bradfordshelley/home/servicenow
I have a scoped application and a custom table in that application. In the table, there are two fields that are of interest to the DTSTART and DTEND variables:
u_started_date | u_due_date
Both of them are Date/Time field types.
There is also an M2M table that references the record in the custom table and a user.
I created an Import / Export Map with the custom table and I created two Field Maps. The fields used are the fields in the custom table.
The Name format is icalendar.[table_name], the table is the custom table and the scope is that of the scoped application.
Here is one of the field maps aswell, the other is is similarly configured, using the other field from the table.
I created an Event Registry:
And I created an After Insert Business Rule which triggers the event:
I created the Email Template to use in the Notification:
And the Message text field contains the VCALENDAR template from the docs.
I created the Notification which is a Meeting Invitation:
The event should trigger when a new record is inserted in the M2M table and the notification should contain the u_started_date value and the u_due_date value from the record for the DTSTART and DTEND variables.
The issue is, the value of DTSTART is when the Notification is created and DTEND is 30 minutes later and sometimes 60 minutes later.
Here is the notification:
The whole process is the following:
1. A record is inserted in the x_860381_lms_m2m_assigned_courses_users table. The record contains two fields, one is a Reference to the record in x_860381_lms_assigned_courses and the other is a reference to sys_user table.
2. After a record is inserted, a notification triggers and sens an email to the users in the records of the x_860381_lms_m2m_assigned_courses_users table.
This is the record of the x_860381_lms_assigned_courses table:
I received some help and we tried different solutions, but none of them work.
Some of the attempted solutions are:
Setting a Timezone ID using TZID after the DTSTART and DTEND variables.
Using Calendar Date/Time field types instead of simple Date/Time field types.
Creating everything in Global, but the Import Export Map record cannot find the scoped application table in the Reference field.
We also tried adding a Default value in the Field Map record, but the Default value is not passed/is overriden by the date/time value when the notification was generated.
Using the field variables in the Email Template, but the Notification doesn't contain any actual values on the DTSTART and DTEND rows. They're empty, as if nothing was written there.
Do you have any suggestions or ideas as to why the mapping seems to fail?
Many thanks,
Gabriel.