sp_Add_vCalendar

sp_Add_vCalendar

sp_Add_vCalendar adds a calendar event attachment to an existing e-mail object.

Remarks

This procedure creates an RFC 2445 VCALENDAR VEVENT (see iCalendar or RFC 5545 for more information) object and may be called any time after an e-mail job has been created. It will insert a single record of type (EVENT_CONTENT.src_type) 0 (Stream) into EVENT_CONTENT table. Use sp_Add_vCalendar_Attendee repeatedly to append optional attendees to the same calendar event by means of returned value in the aKey parameter.

Syntax

exec sp_Add_vCalendar @gKey=... , @jKey=... , @aKey=... out , @start=... , @end=... [ , @from=...
                     , @to=... , @rsvp=... , @method=... ,@categories=... , @class=... , @summary=...
                     , @location=... , @descrip=... ]

Parameters

Column Name Data type Direction Description Default Status
@gKey uniqueidentifier in gKey found in EVENT_MASTER table Required
@jKey uniqueidentifier in jKey found in OUT_EMAIL table Required
@aKey uniqueidentifier in, out aKey found in EVENT_CONTENT table; for CANCEL (see @method parameter below) must pass aKeyfrom the original request; the new id will be always generated and returned as output parameter null Optional
@start datetime in Event beginning date and time (Boomerang local server time) Required
@end datetime in Event ending date and time (Boomerang local server time) Required
@from varchar(100) in E-mail address for the organizer of the calendar event null Optional
@to varchar(100) in E-mail address for the calendar event optional attendee null Optional
@rsvp bit in Flag indicating whether or not an optional attendee should accept invitation for the calendar event (1 = Yes, 0 = No) null, defaults to 1 Optional
@method varchar(20) in Method by which the calendar event must be processed by the corporate system; optional values include: PUBLISH, REQUEST, CANCEL; for CANCEL must pass aKey from the original request to @aKeyparameter; null, defaults to REQUEST Optional
@categories varchar(100) in Event categories; use colon to separate multiple values; examples include: MEETING, APPOINTMENT, etc. null, defaults to MEETING Optional
@class varchar(50) in Privacy class; optional values include: PUBLIC, PRIVATE, CONFIDENTIAL null, defaults to PUBLIC Optional
@summary nvarchar(max) in Short summary of the calendar event, appears in the subject lines null Optional
@location nvarchar(max) in Short geographical location of the calendar event null Optional
@descrip nvarchar(max) in Detailed description of the calendar event null Optional

 Return Code Values

0 (success) or non-zero (failure)

Permissions

user: public

Examples

To add a calendar event to an existing e-mail object.

declare @aKey uniqueidentifier
/* .... some code ... */
 
exec sp_Add_vCalendar
 @gKey = @gKey
,@jKey = @jKey
,@aKey = @aKey out
,@start = '2012-05-21 14:00:00.000'
,@end = '2012-05-21 15:00:00.000'
,@from = 'info@fuel9.com'
,@to = 'bob@domain.com'
,@summary = 'Discuss possibilities of the vCalendar object'
,@descrip = 'This document defines the iCalendar data format for representing and
            exchanging calendaring and scheduling information such as events,
            to-dos, journal entries, and free/busy information, independent of any
            particular calendar service or protocol. For more information see IETF RFC 5545, 5546.'
 
-- @aKey contains id of the attachement and can be further used to add more attendees
 
/* .... some code ... */

See Also

Helpers
Database Tables
Getting Started