Skip to main content
Version: 2026.0

calendars

JDito Funktionen zur Verwaltung mit Kalenderfunktionen

Methods

addPermissions

addPermissions(pCalendarUser, pElementType, pPermissions, pPermittedProperties, pRemoveInactive, pSortStrategy): void

Adds possible calendar users and their rights, filters out all inactive users.

Parameters

pCalendarUser
any

The calendar user as an array of objects as returned by calendars.getCalendarUser.

pElementType
number

The type of the calendar element, which is affected (VEVENT, VTODO)

pPermissions
any

Array of given permissions (PERMISSION_WRITE, PERMISSION_READ)

pPermittedProperties
any

Name of properties, which ca be accessednull for all (only READ supported yet)

pRemoveInactive
boolean

true removes all inactive users from the list.

pSortStrategy
number

The sorting strategy see calendars.SORTSTRATEGY_*.

Returns

void

Throws

May throw an exception.


clearCache

clearCache(): void

Clears the cache of the entire calendar. Required if you want to explicitly request new data. For example, this function should be used automatically before refreshing a frame that contains calendar data.

Returns

void

Throws

May throw an exception.


Example

calendars.clearCache();

getAuthorizedUsers

getAuthorizedUsers(pElementType, pPermission): string[][]

Liefert alle Benutzer, welche die übergebenen Berechtigungen besitzen.

[0] die Testdarstellung des Benutzers [1] der Titel des Benutzers

Parameters

pElementType
number

der Typ des Kalendarelements, für den die Rechte vorhanden sein müssen (VEVENT, VTODO)

pPermission
string | number | boolean

das Recht, das vorhanden sein muss

Returns

string[][]

die Benutzer mit ID und Name

Throws

May throw an exception.


getAvailableTimeZoneIds

getAvailableTimeZoneIds(): string[]

Returns all time zones available in the system.

Returns

string[]

The IDs of the available time zones.


Example

var timezones = calendars.getAvailableTimeZoneIds();
question.showMessage(timezones.join("\n"));

getAvailableTimeZones

getAvailableTimeZones(): string[]

Returns all time zones available in the system.

Returns

string[]

The IDs of the available time zones.

Throws

May throw an exception.


Example

var timezone = calendars.getAvailableTimeZones();
question.showMessage(timezone.join("\n"));

getBackendType

getBackendType(): number

Returns the backend type.

Returns

number

The backend type (*calendars.BACKEND_**).

Throws

AditoException


Example

var type = calendars.getBackendType();
if(type == calendars.BACKEND_DB) logging.log("Database backend for calendar found");

getBackendTypeTasks

getBackendTypeTasks(): number

Returns the backend type for task objects.

Returns

number

The backend type (calendars.BACKEND_DB, calendars.BACKEND_DOMINO, calendars.BACKEND_DOMINO_REST, calendars.BACKEND_EXCHANGEWS oder calendars.BACKEND_NONE)

Throws

AditoException


Example

var type = calendars.getBackendTypeTasks();
if(type == calendars.BACKEND_DB) logging.log("Database backend for calendar found");

getCalendarInfo

getCalendarInfo(pCalendarUser): Map<any, any>

Returns metadata about the calendar of a specific user. See calendars.INFO_* for a list of available properties.

Parameters

pCalendarUser
string | number | boolean

the user

Returns

Map<any, any>

the metadata

Throws

May throw an exception.

Example

const info = calendars.getCalendarInfo("Admin");
const availableVirtualMeetingProviders = info[calendars.INFO_VIRTUAL_MEETING_PROVIDERS]:

getCalendarUser

getCalendarUser(pTitle?): string

Returns the user with the specified title.

Parameters

pTitle?
string | number | boolean

Login name of the user.

Returns

string

The ID of the calendar user in the following format: '; mailto:admin@domain.local; CN:Admin; '.

Throws

May throw an exception.


Example

var cu = calendars.getCalendarUser(vars.getString("$sys.user"));
question.showMessage(cu);

getCalendarUsers

getCalendarUsers(pTitle): string[]

Returns the users with the specified titles.

Parameters

pTitle
any

The login names of the users as an array.

Returns

string[]

The IDs of the calendar users as an array. The ID of the calendar user is returned in the following format: ';mailto:t.mcdohl@scarletmoon.com;CN:t.mcdohl;'. Or 'null' if the user doesn't exist.

Throws

May throw an exception.


Example

var users = new Array("Admin", "Lisa Summer", "Peter Peterson");
var cusers = calendars.getCalendarUsers(users);
var string = "";
for (var i=0; i<cusers.length; i++)
{
string = string + cusers[i] + "\n";
}
question.showMessage(string);

getDisplayCalendarUsers

getDisplayCalendarUsers(pRights): string[][]

Returns all users that can be selected in the calendar.

Returns the display name as the second part.

[0] The user's test representation

[1] The user's display name

Parameters

pRights
number

The rights that the user must have (calendars.RIGHT_READ/calendars.RIGHT_WRITE).

Returns

string[][]

The users with their IDs and display names.

Throws

May throw an exception.


Example

var users = calendars.getDisplayCalendarUsers(calendars.RIGHT_READ);
var ret = "";
for (i = 0; i < users.length; i++)
{
ret += "\n" + users[i][0] + " / " + users[i][1] + " / ";
}
question.showMessage(ret);

getElementPrefs

getElementPrefs(): Map<any, any>

Retrieves the configuration settings for the calendar categories.

Returns

Map<any, any>

The entries as a map. These can be retrieved using the calendars.ELEM_CATEGORIES_TODO and calendars.ELEM_CATEGORIES_EVENT constants.

Throws

May throw an exception.


Example

var elem_prefs = calendars.getElementPrefs();
var cat_task = elem_prefs[calendars.ELEM_CATEGORIES_TODO];
var str = "Task categories:\n";
for (i=0; i<cat_task.length; i++)
{
str = str + cat_task[i] + "\n";
}
str = "\n" + str + "Appointment categories:\n";
var cat_event = elem_prefs[calendars.ELEM_CATEGORIES_EVENT];
for (i=0; i<cat_event.length; i++)
{
str = str + cat_event[i] + "\n";
}
question.showMessage(str);

getEntries

getEntries(pConditions): Map<any, any>[][]

Returns the entries in the calendar that correspond to the conditions that are passed.

Parameters

pConditions
any[]

The conditions as an associative array. When searching for entries, you can use the properties from the following list: END: End date of the appointment or task START: Start date of the appointment or task STATUS: Status of the task TYPE: Entry type (calendars.VEVENT | calendars.VTODO) UID: The unique ID of the calendar entry USER: The owner of the calendar entry

Returns

Map<any, any>[][]

The entries as a map.

Throws

May throw an exception.


Example

var conditions = new Array();
conditions["COUNT"] = "1";
conditions["TYPE_1"] = calendars.VEVENT;
conditions["USER_1"] = "Admin";
var entries = calendars.getEntries(conditions);
var string = "";
for (var i=0; i<entries.length; i++)
{
var entry = entries[i];
// Review the entry once again because a recurring appointment has multiple elements,
// Default appointment has only one element
for (var k=0; k<entry.length; k++)
{
string = string + entry[k][calendars.SUMMARY] + "\n";
}
}
question.showMessage(string);

getEntry

getEntry(pUID, pReccurrenceID, pUser, pType?): Map<any, any>

This method can be used to get a calendar entry from the backend.

{code var elementuid = '8a7b8d4e-9321-43b3-9074-85a3e286514e';

var entry = calendars.getEntry(elementuid, null, "Admin", calendars.VEVENT);

logging.show([typeof(entry), entry[0][calendars.SUMMARY] ]); }

Parameters

pUID
string | number | boolean

The ID of the calendar entry.

pReccurrenceID
string | number | boolean

For recurring appointments, this ID indicates the element to be edited; 'null' for the mail element. The recurrenceID represents the date as a long.

pUser
string | number | boolean

The affected user.

pType?
number

The type of calendar entry. calendars.VTODO for tasks, calendars.VEVENT for appointments.

Returns

Map<any, any>

The entries as a map, but in the form of a two-dimensional array.

Throws

May throw an exception.


getExpandedEntries

getExpandedEntries(pConditions, pIntervalStart, pIntervalEnd): Map<any, any>[][]

Retrieves calendar entries from the calendar, based on the conditions passed from the calendar. For recurring appointments, a separate entry will be returned for every instance.

Parameters

pConditions
any[]

The conditions as an associative array. When searching for entries, you can use the properties from the following list: END: End date of the appointment or task START: Start date of the appointment or task STATUS: Status of the task TYPE: Entry type (calendars.VEVENT | calendars.VTODO) UID: The unique ID of the calendar entry USER: The owner of the calendar entry

pIntervalStart
number

Start of the interval that comprises the required elements (date as a "long" value).

pIntervalEnd
number

End of the interval that comprises the required elements (date as a "long" value).

Returns

Map<any, any>[][]

The entries as a map.

Throws

May throw an exception.


Example

var dtStart = datetime.toLong("2016-09-01", "yyyy-MM-dd", "Europe/Berlin");
var dtEnd = datetime.toLong("2016-09-30", "yyyy-MM-dd", "Europe/Berlin");
var condition = new Array();
condition["COUNT"] = "1";
condition["TYPE_1"] = calendars.VEVENT;
condition["START_1"] = String(dtStart);
condition["END_1"] = String(dtEnd);
condition["USER_1"] = vars.getString("$sys.user");
var entries = calendars.getExpandedEntries(condition, dtStart, dtEnd);
logging.show(entries.length);

getExpandedEntry

getExpandedEntry(pID, pUser, pIntervalStart, pIntervalEnd, pType?): Map<any, any>[]

This method can be used to get a calendar entry from the back-end. For recurring appointments, a separate entry will be returned for every instance.

Parameters

pID
string | number | boolean

ID of the calendar entry.

pUser
string | number | boolean

The affected user.

pIntervalStart
number

Start of the interval that comprises the required elements (date as a "long" value).

pIntervalEnd
number

End of the interval that comprises the required elements (date as a "long" value).

pType?
number

The type of calendar entry. calendars.VTODO for tasks, calendar.VEVENT for appointments.

Returns

Map<any, any>[]

The entry as a map.

Throws

May throw an exception.


Example

var entry = calendars.getExpandedEntry(text.decodeFirst(vars.getString("$comp.tbl_Task")), 'Admin', 13370815, 13374711, calendars.VTODO);

getFullAuthorizedUsers

getFullAuthorizedUsers(pElementType, pPermission): any[][]

Liefert alle Benutzer, welche die übergebenen Berechtigungen besitzen.

[0] die Testdarstellung des Benutzers [1] der Titel des Benutzers [2] Objektdarstellung des Users

Parameters

pElementType
number

der Typ des Kalendarelements, für den die Rechte vorhanden sein müssen (VEVENT, VTODO)

pPermission
string | number | boolean

das Recht, das vorhanden sein muss

Returns

any[][]

die Benutzer mit ID und Name

Throws

May throw an exception.


getFullCalendarUsers

getFullCalendarUsers(pRights): any[][]

Returns all users that can be selected in the calendar.

Returns the title as the second part

[0] The user's test representation

[1] The title of the user

[2] object representation of the user

Parameters

pRights
number

The rights that the user must have (calendars.RIGHT_READ/calendars.RIGHT_WRITE).

Returns

any[][]

The users with their IDs, display names, and object representation.

Throws

May throw an exception.


Example

var users = calendars.getFullCalendarUsers(calendars.RIGHT_READ);
var ret = "";
for (i = 0; i < users.length; i++)
{
ret += "\n" + users[i][0] + " / " + users[i][1] + " / " + users[i][2];
}
question.showMessage(ret);

getRuleAsMap

getRuleAsMap(pRule): Map<any, any>

Returns the recurrence of a recurring appointment as a map for easier processing.

Parameters

pRule
string | number | boolean

The recurrence.

Returns

Map<any, any>

The recurrence as a map.

Throws

May throw an exception.


Example

var conditions = new Array();
conditions["COUNT"] = "1";
conditions["USER_1"] = "Admin";
var entries = calendars.getEntries(conditions);
for (var i=0; i<entries.length; i++)
{
var entry = entries[i];
for (var k=0; k<entry.length; k++)
{
var rruleStr = entry[k][calendars.RRULE];
if (rruleStr != undefined)
{
var rrule = calendars.getRuleAsMap(rruleStr[0]);
var freq = rrule["FREQ"];
question.showMessage(freq);
}
}
}

getSyncBackendType

getSyncBackendType(): number

This function returns the calendar backend type used for synchronization.

Note that will always return calendars.BACKEND_DB, if calendar synchronization is used, as DB is the only supported master backend.

Returns

number

The backend type (*calendars.BACKEND_**).

Throws

AditoException

Example

calendars.getBackendType()

getSyncBackendTypeScope

getSyncBackendTypeScope(): number[]

Returns the sync backend type scope.

Returns

number[]

An integer array that contains the items to be synchronized (calendars.VEVENT/calendars.VTODO).


Example

// Check sync backend type
if (calendars.getSyncBackendType() != calendars.BACKEND_NONE && calendars.getSyncBackendType() != 3)
{
var scope = calendars.getSyncBackendTypeScope();
if (scope.length == 1 && scope[0] == pScope) // Scope.length = 1 -> VEVENT *OR* VTODO
return calendars.getSyncBackendType();
else if (scope.length == 2) // Scope.length = 2 -> Both
return calendars.getSyncBackendType();
// Scope.length = 0 -> Nothing selected -> Skip this block
}

hasPermission

hasPermission(pCalendarUser, pElementType, pPermission): boolean

Checks, if there is a valid permissions für a given user

Parameters

pCalendarUser
string | number | boolean

The calendar user

pElementType
number

The type of the calendar element, which is affected (VEVENT, VTODO)

pPermission
string | number | boolean

Checked permissions (PERMISSION_WRITE, PERMISSION_READ)

Returns

boolean

true if access is permitted

Throws

May throw an exception.


importICS

importICS(pICalText, pDefaultTimeZone): string[]

Imports calendar data in ICS format into the user' calendar.

Parameters

pICalText
string | number | boolean

The text file with the ICS contents.

pDefaultTimeZone
string | number | boolean

The default time zone to be used if none was specified.

Returns

string[]

The IDs of the elements created. Their order may deviate from the order of the elements in iCalText.

Throws

May throw an exception.


Example

calendars.importICS("C:\\temp\\entry.ics", "Europe/Berlin");

insert

insert(pEntry, pGroupType?): string[]

Creates a new entry.

Parameters

pEntry
any

The entry as a map or NativeArray.

pGroupType?
number

For group elements, the type of group (calendars.GROUP_MULTI: A separate entry for each user, calendars.GROUP_SINGLE a single entry for all users).

Returns

string[]

The ID of the entry created.

Throws

May throw an exception.


Example

var entry = new Array();
entry[calendars.TYPE] = calendars.VTODO;
entry[calendars.SUMMARY] = "Task";
entry[calendars.LOCATION] = "Geisenhausen";



entry[calendars.DESCRIPTION] = "Presentation of the new system";
entry[calendars.DTSTART] = vars.getString("$sys.date");
entry[calendars.DUE] = datetime.toLong(datetime.toDate(vars.getString("$sys.date"), "dd.MM.yyyy 23:59"), "dd.MM.yyyy HH:mm");



entry[calendars.USER] = calendars.getCalendarUser(vars.getString("$sys.user"));
entry[calendars.STATUS] = calendars.STATUS_NEEDSACTION;
entry[calendars.HASREMINDER] = "true";
entry[calendars.REMINDER] = vars.getString("$sys.date");



entry[calendars.PERCENT] = "50";
entry[calendars.PRIORITY] = "9";
entry[calendars.CLASSIFICATION] = "Example";
calendar.CLASSIFICATION_PRIVATE;



entry[calendars.LINKS] = "1";
entry["LINK_ALIAS_1"] = vars.getString("$sys.dbalias");
entry["LINK_TABLE_1"] = "FIRMA";
entry["LINK_IDCOLUMN_1"] = "FIRMAID";



entry["LINK_DBID_1"] = vars.getString("$comp.FIRMAID");
entry["LINK_FRAME_1"] = "FIRMA";
entry["LINK_TITLE_1"] = "Company<-Task";



calendars.insert(new Array(entry), calendars.GROUP_MULTI);

refresh

refresh(pConditions?): void

Force-refresh the current calendar It resets the reload-timers in the backend/calendar-cache for the given conditions, which leads to a reload of all affected entries. If no conditions are passed, everything gets reloaded.

Parameters

pConditions?
any[]

The conditions as an associative array. When searching for entries, you can use the properties from the following list: END: End date of the appointment or task START: Start date of the appointment or task STATUS: Status of the task TYPE: Entry type (calendars.VEVENT | calendars.VTODO) UID: The unique ID of the calendar entry USER: The owner of the calendar entry

Returns

void

Throws

May throw an exception.


Example

var conditions = new Array();
conditions["COUNT"] = "1";
conditions["USER_1"] = "Admin";
calendar.refresh(conditions);

remove

remove(pEntry): void

Deletes a calendar entry.

Parameters

pEntry
any

The entry as a map or the UID of the element to be deleted. For the structure of the entry, please refer to calendars.insert().

Returns

void

Throws

May throw an exception.


Example

calendars.remove("c145271f-ca8f-4a1a-b56b-d94f7efecfa4");

removeEntry

removeEntry(pEntry, pReccurenceID?): void

Deletes a single element from a recurring appointment calendar entry.

Parameters

pEntry
any

The entry as a map or the UID of the element to be deleted. For the structure of the entry, please refer to calendars.insert().

pReccurenceID?
string | number | boolean

The RecurrenceID of the entry to be deleted; 'null' deletes the entire element. If the recurrenceID for calendars.removeEntry() is null and the object you passed for entry is not an exception of a recurring appointment, calendars.removeEntry() is identical to calendars.remove().

Returns

void

Throws

May throw an exception.


Example

var conditions = new Array();
conditions["COUNT"] = "1";
conditions["USER_1"] = "Admin";
var entries = calendars.getEntries(conditions);



for (var i=0; i<entries.length; i++) {
var entry = entries[i];



for (var k=0; k<entry.length; k++) {
var rid = entry[k][calendars.RECURRENCEID];
question.showMessage(rid);



if (rid != undefined) {
question.showMessage("Deleting");
calendars.removeEntry(entry[k][calendars.ID], rid);


}
}
}

removeEntryByUID

removeEntryByUID(pType, pUser, pEntryUID, pReccurenceID): void

Deletes a single element from a recurring appointment calendar entry.

Parameters

pType
number

The element type. calendars.VTODO for tasks, calendars.VEVENT for appointments.

pUser
string | number | boolean

The user associated with the entry (mailbox).

pEntryUID
string | number | boolean

The UID of the entry.

pReccurenceID
string | number | boolean

The RecurrenceID of the entry to be deleted; 'null' deletes the entire element. If the recurrenceID for calendars.removeEntry() is null and the object you passed for entry is not an exception of a recurring appointment, calendars.removeEntry() is identical to calendars.remove().

Returns

void

Throws

May throw an exception.


Example

var entry = vars.get("$image.entry");
var recurrenceId = entry[calendars.RECURRENCEID];
if (recurrenceId == undefined) recurrenceId = null;
calendars.removeEntry(calendars.VTODO, entry[calendars.USER2]["cn"], entry[calendars.ID], recurrenceId);

resetCalendarUser

resetCalendarUser(): void

Resets the user permissions of all calendar users. Then there are no more authorizations, i.e. no rights to the own calendar anymore.

Returns

void

Throws

May throw an exception.


Example

calendars.resetCalendarUser();

setCalendarUser()

setCalendarUser(pCalendarUser, pRights): void

Sets the possible calendar users and their rights, filters out all inactive users.

Note on calendar rights:

If calendars.resetCalendarUser has been run, the user has no rights, even on his or her own calendar.

If nothing has been called (no calendars.setCalendarUser), there are rights to users' own and calendars with the same roles.

Parameters

pCalendarUser
any

The calendar user as an array of objects as returned by calendars.getCalendarUser.

pRights
number

The rights that the current user has for the users. These can be connected to or ("|"). Possible values: calendars.RIGHT_WRITE, calendars.RIGHT_READ, calendars.RIGHT_READ_APPOINTMENT, calendars.RIGHT_READ_TASK, calendars.RIGHT_WRITE_APPOINTMENT, calendars.RIGHT_WRITE_TASK.

Returns

void

Deprecated

5.1 ersetzt durch: addPermissions

Throws

May throw an exception.

setCalendarUser(pCalendarUser, pRights, pRemoveInactive): void

Sets the possible calendar users and their rights, filters out all inactive users.

Note on calendar rights:

If calendars.resetCalendarUser has been run, the user has no rights, even on his or her own calendar.

If nothing has been called (no calendars.setCalendarUser), there are rights to users' own and calendars with the same roles.

Example

calendars.setCalendarUser(new Array(vars.getString("$sys.user")), calendars.RIGHT_WRITE | calendars.RIGHT_READ);

Example

calendars.setCalendarUser(new Array(vars.getString("$sys.user")), calendars.RIGHT_WRITE | calendars.RIGHT_READ, false);

//Example 2 if (tools.hasRole(user, "PROJECT_Support")) &#123; var support = tools.getUsersWithRole("PROJECT_Support"); calendars.setCalendarUser( support, calendars.RIGHT_WRITE_TASK | calendars.RIGHT_READ_TASK ); &#125;

Parameters

pCalendarUser
any

The calendar user as an array of objects as returned by calendars.getCalendarUser.

pRights
number

The rights that the current user has for the users. These can be connected to or ("|"). Possible values: calendars.RIGHT_WRITE, calendars.RIGHT_READ, calendars.RIGHT_READ_APPOINTMENT, calendars.RIGHT_READ_TASK, calendars.RIGHT_WRITE_APPOINTMENT, calendars.RIGHT_WRITE_TASK.

pRemoveInactive
boolean

true removes all inactive users from the list.

Returns

void

Deprecated

5.1 ersetzt durch: addPermissions

Throws

May throw an exception.

setCalendarUser(pCalendarUser, pRights, pRemoveInactive, pSortStrategy): void

Sets the possible calendar users and their rights, filters out all inactive users.

Note on calendar rights:

If calendars.resetCalendarUser has been run, the user has no rights, even on his or her own calendar.

If nothing has been called (no calendars.setCalendarUser), there are rights to users' own and calendars with the same roles.

Example

calendars.setCalendarUser(new Array(vars.getString("$sys.user")), calendars.RIGHT_WRITE | calendars.RIGHT_READ, false, calendars.SORTSTRATEGY_NATURAL);

Parameters

pCalendarUser
any

The calendar user as an array of objects as returned by calendars.getCalendarUser.

pRights
number

The rights that the current user has for the users. These can be connected to or ("|"). Possible values: calendars.RIGHT_WRITE, calendars.RIGHT_READ, calendars.RIGHT_READ_APPOINTMENT, calendars.RIGHT_READ_TASK, calendars.RIGHT_WRITE_APPOINTMENT, calendars.RIGHT_WRITE_TASK.

pRemoveInactive
boolean

true removes all inactive users from the list.

pSortStrategy
number

The sorting strategy see calendars.SORTSTRATEGY_*.

Returns

void

Deprecated

5.1 replaced by: addPermissions

Throws

May throw an exception.


setCheckAttendeesOnWrite

setCheckAttendeesOnWrite(pValue): void

Sets whether the system will check the permissions of the attendees (participants) when writing elements.

Parameters

pValue
boolean

true if a check is to be performed.

Returns

void

Throws

May throw an exception.


Example

calendars.setCheckAttendeesOnWrite(true);

setDeleteProcess

setDeleteProcess(pProcess): void

Sets the JDito process to be executed when deleting entries. Within this process, the $local.uid variable is available. It contains the UID of the calendar entry.

Parameters

pProcess
string | number | boolean

The calendar process that will be executed automatically when deleting calendar entries. 'null' if no process should be executed.

Returns

void

Throws

May throw an exception.


Example

// in the autostart process
calendars.setDeleteProcess("calendardeletestuff"); The following local variables are available in the transferred process: - "$local.uid" : the calendar_uid

setIgnoreInactiveAttendeesOnWrite

setIgnoreInactiveAttendeesOnWrite(pValue): void

With this process, you can specify that attendees (participants) unknown to ADITO will be ignored when setting an appointment. This value will be overwritten by the pRemoveInactive parameter when using calendars.setCalendarUser(). This means that setCalendarUser must be executed before you set unknown participants. This indicates users who are known to ADITO, but who are no longer active. For example, this is the case if an employee leaves the company but still exists in group appointments. In contrast to calendars.setIgnoreUnknownUsersOnWrite(), a user data model exists for these users.

Parameters

pValue
boolean

Specifies whether unknown users should be ignored (true) or not.

Returns

void

Throws

May throw an exception.


Example

calendars.setIgnoreInactiveAttendeesOnWrite(true);

setIgnoreUnknownUsersOnWrite

setIgnoreUnknownUsersOnWrite(pValue): void

With this process, you can specify that users unknown to ADITO will be ignored. This applies, for example, if users of a calendar backend such as Microsoft Exchange have not been created in ADITO. To be able to change calendar entries in ADITO or create links to them anyway, you need to enable a mechanism that checks for unknown users and ignores the ones found. Unlike calendars.setIgnoreInactiveAttendees(), this process uses users who are not known to ADITO at all, i.e. users for whom no user data model exists.

Parameters

pValue
boolean

Specifies whether unknown users should be ignored true or not.

Returns

void

Throws

May throw an exception.


Example

calendars.setIgnoreUnknownUsersOnWrite(true);

setInsertProcess

setInsertProcess(pProcess): void

Sets the JDito process to be generated when creating entries. Within this process, the $local.uid variable is available. It contains the UID of the calendar entry.

Parameters

pProcess
string | number | boolean

The calendar process that will be executed automatically when creating calendar entries. 'null' if no process should be executed.

Returns

void

Throws

May throw an exception.


Example

// in the autostart process
calendars.setInsertProcess("calendarinsertstuff"); The following local variables are available in the transferred process: - "$local.uid" : the calendar_uid

setMeetingModificationByOrganizerOnly

setMeetingModificationByOrganizerOnly(pValue): void

Specifies whether group appointments may only be changed by the organizer.

Parameters

pValue
boolean

true if group appointments may only be changed by the organizer. Can be set in the autostart process of the client, for example.

Returns

void

Throws

May throw an exception.


Example

calendars.setMeetingModificationByOrganizerOnly(true);

setReminderProcess

setReminderProcess(pProcess): void

Sets the JDito process that informs about reminders for entries. Within this process, the $local.uid variable is available. It contains the UID of the calendar entry.

Parameters

pProcess
string | number | boolean

The calendar process that will be executed automatically when a calendar reminder is due. 'null' if no process should be executed.

Returns

void

Throws

May throw an exception.


Example

// in the autostart process
calendars.setReminderProcess("calendarreminder"); The following local variables are available in the transferred process: - "$local.uid" : the calendar_uid

setUpdateProcess

setUpdateProcess(pProcess): void

Sets the JDito process to be executed when changing entries. Within this process, the $local.uid variable is available. It contains the UID of the calendar entry.

Parameters

pProcess
string | number | boolean

The calendar process that will be executed automatically when changing calendar entries. 'null' if no process should be executed.

Returns

void

Throws

May throw an exception.


Example

// in the autostart process
calendars.setUpdateProcess("calendarupdatestuff"); The following local variables are available in the transferred process: - "$local.uid" : the calendar_uid

toICS

toICS(pType, pUser?, pEntryUID?): string

Creates an RFC 2445-compatible object from a calendar object.

Parameters

pType
number

The type of calendar entry. calendars.VTODO for tasks, calendar.VEVENT for appointments.

pUser?
string | number | boolean

User of this entry (mailbox).

pEntryUID?
string | number | boolean

The ID of the calendar entry.

Returns

string

The RFC text.

Throws

AditoException


Example

var elementuid = 'e401d53c-c987-405b-b470-0343002abdc3'; logging.show(calendars.toICS(calendars.VTODO, "Admin", elementuid));

update

update(pElement): void

Updates a calendar entry.

Parameters

pElement
any

The entry as a map or NativeArray.

Returns

void

Throws

May throw an exception.


Example

// Create new task and enter it into the calendar
var entry = new Array();
entry[calendars.TYPE] = calendars.VTODO;
entry[calendars.DTSTART] = vars.getString("$sys.date");
entry[calendars.DUE] = datetime.toLong(datetime.toDate(vars.getString("$sys.date"), "dd.MM.yyyy 23:59"), "dd.MM.yyyy HH:mm");



entry[calendars.USER] = calendars.getCalendarUser(vars.getString("$sys.user"));
entry[calendars.DESCRIPTION] = "Release management";
entry[calendars.SUMMARY] = "We need to talk about the new releases.";
entry[calendars.STATUS] = calendars.STATUS_NEEDSACTION;



entry[calendars.AFFECTEDUSERS] = "";
var id = calendar.insert(new Array(entry))[0];
question.showMessage(id);



// Get task again and change task summary
var en = calendars.getEntry(id, null, vars.getString("$sys.user"), calendars.VTODO);
question.showMessage(en[calendars.SUMMARY]);
en[calendars.SUMMARY] = "We need to talk about the new releases and the way to communicate them to our customers";
calendars.update(new Array(en));



// Check whether the summary change was successful
var e = calendars.getEntry(id, null, vars.getString("$sys.user"), calendars.VTODO);
question.showMessage(e[calendars.SUMMARY]);

updateEntry

updateEntry(pEntry): void

Updates a calendar entry. Only the entry which is passed and not the entire element (series) will be updated. Links remain unaffected.

Parameters

pEntry
any

The entry as a map. Must contain the UID of the entry.

Returns

void

Throws

May throw an exception.

Properties

Example

var conditions = new Array();
conditions["COUNT"] = "1";
conditions["USER_1"] = "Admin";
var entries = calendars.getEntries(conditions);



for (var i=0; i<entries.length; i++) {
var entry = entries[i];



for (var k=0; k<entry.length; k++) {
var rid = entry[k][calendars.RECURRENCEID];
// If the entry is an exception, the recurrenceID is undefined



if (rid != undefined) {
var entr = entry[k];
entr[calendars.SUMMARY] = "foobar";
question.showMessage("Exception of recurring appointment is being updated");
calendars.updateEntry(entr);
}
}
}

AFFECTEDUSERS

string

Constant for the calendar entry, here for the users affected by the entry.


ATTENDEES

string

Constant for the calendar entry, here for the attendees of a entry.


BACKEND_CALDAV

number

Constant for calendar backend types, in this case a CalDav-Server is used as backend via a webservice.


BACKEND_DB

number

Constant for calendar backend types, in this case the database is used as backend.

Example

// Insert a new entry or update a existing one
if (vars.getString("$image.editmode") == calendars.MODE_INSERT)
{
var gt = calendars.GROUP_NONE;
if ( calendars.getBackendTypeTasks() == calendars.BACKEND_DB || calendars.getBackendTypeTasks() == calendars.BACKEND_DOMINO )
{
var grouptype = vars.get("$comp.grouptype");
if (grouptype == "single") gt = calendars.GROUP_SINGLE;
if (grouptype == "multi") gt = calendars.GROUP_MULTI;
}
entry[calendars.ID] = calendars.insert(new Array(entry), gt)[0];
vars.set("$image.editmode", calendars.MODE_UPDATE);
}
else
calendars.update([entry]);

BACKEND_DOMINO

BACKEND_DOMINO: number

Constant for calendar backend types, in this case Domino DIIOP. Obselete, do not use.

Deprecated

This API is deprecated.


BACKEND_DOMINO_REST

number

Constant for calendar backend types, in this case Domino via webservice


BACKEND_EXCHANGEWS

number

Constant for calendar backend types, in this case Microsoft Exchange is used as backend via a webservice.

Example

if( calendars.getBackendType() != calendars.BACKEND_EXCHANGEWS )
{
result.object( [ [calendars.STATUS_TENTATIVE, translate.text("Tentative")]
, [calendars.STATUS_CONFIRMED, translate.text("Confirmed")]
, [calendars.STATUS_CANCELLED, translate.text("Cancelled")]
] );
}
else //only Exchange uses special status.
{
result.object( [ [calendars.STATUS_TENTATIVE, translate.text("Tentative")]
, [calendars.STATUS_BUSY, translate.text("Busy")]
, [calendars.STATUS_OOF, translate.text("Out of Office")]
, [calendars.STATUS_FREE, translate.text("Free")]
] );
}

BACKEND_MS_GRAPH

number

BACKEND_NONE

number

Constant for no active calendar, for use with calendar.getBackendType()


CATEGORIES

string

Constant for the calendar entry, here for the calendar categories.


CLASSIFICATION

string

Constant for the calendar entry, here for the classification of the entry.


CLASSIFICATION_PRIVATE

string

Constant for the calendar entry, here for a private item.


CLASSIFICATION_PUBLIC

string

Constant for the calendar entry, here for a public item.


COMMENT

string

Constant for the calendar entry, here for the comment.


CONDITION_COUNT

string

Calendar search condition constants.

In this case, the number of different search packages is calculated over the different numbers behind the conditions.


CONDITION_ENDTIME

string

Constants for calendar search conditions, here is the end date.


CONDITION_LASTMODIFIED

string

Constants for calendar search conditions, here is the last processing period.


CONDITION_STARTTIME

string

Constants for calendar search conditions, here is the start date.


CONDITION_STATUS

string

Constants for calendar search conditions, here is the status.


CONDITION_TYPE

string

Constants for calendar search conditions, here the type of the entry (calendars.VEVENT or calendars.VTODO).


CONDITION_UID

string

Constants for calendar search conditions, here the unique marking of the calendar entry.


CONDITION_USER

string

Calendar search conditions constants, here the owner of the calendar entry.


CREATED

string

Constant for the calendar entry, here for the creation date.

Example

var event = vars.get("$image.entry");
var organizer = event[calendars.ORGANIZER2];
var owner = event[calendars.USER2];
var created = datetime.toDate(event[calendars.CREATED], translate.text("dd.MM.yyyy HH:mm"));

DAILY

string

DESCRIPTION

string

Constant for the calendar entry, here for the description of the entry.

Example

var Entry = calendars.getEntry( id[1], null, id[2],calendars.VEVENT);
Entry[calendars.SUMMARY] = translate.text("Vacation approved");
Entry[calendars.DESCRIPTION] = translate.withArguments("Vacation approved of %0 on %1", [vars.getString("$sys.user"), datetime.toDate(vars.getString("$sys.today"), translate.text("dd.MM.yyyy"))]);
Entry[calendars.CATEGORIES] = text.encodeMS(["Vacation approved"]);
calendars.update(new Array(Entry));

DTEND

string

Constant for the calendar entry, here for the end.

Example

var id = text.decodeFirst(vars.getString("$comp.tbl_vacation"));



Entry = [];
Entry[calendars.TYPE] = calendars.VEVENT;
Entry[calendars.DTSTART] = datetime.toLong(von, "dd.MM.yyyy");
Entry[calendars.DTEND] = String ( eMath.addInt(datetime.toLong(datetime.today(), "dd.MM.yyyy"), datetime.ONE_DAY) );
Entry[calendars.USER] = calendars.getCalendarUser(id[1]);
Entry[calendars.STATUS] = calendars.STATUS_BUSY;
Entry[calendars.CLASSIFICATION] = calendars.CLASSIFICATION_PUBLIC;
calendars.insert([Entry]);

DTSTAMP

string

Constant for the calendar entry, here for the timestamp.


DTSTART

string

Constant for the calendar entry, here for the start.

Example

var entry = new Array();
entry[calendars.TYPE] = calendars.VTODO;
entry[calendars.SUMMARY] = "Meeting (new building)";
entry[calendars.DTSTART] = datetime.date();
entry[calendars.DTEND] = datetime.date();
entry[calendars.USER] = calendars.getCalendarUser("admin");
entry[calendars.STATUS] = calendars.STATUS_NEEDSACTION;
entry[calendars.DESCRIPTION] = "Meeting";



calendars.insert([entry]);

DUE

string

Constant for the calendar entry, here for the due date.


DURATION

string

Constant for the calendar entry, here for the duration of the entry.


ELEM_CATEGORIES_EVENT

string

Constant for the calendar category, in this case an appointment.

Example

// Filling a ComboBox with the categories var rawElements = calendars.getElementPrefs()[calendars.ELEM_CATEGORIES_EVENT];

ELEM_CATEGORIES_TODO

string

Constant for the calendar category, in this case a task.

Example

// Filling a ComboBox with the categories var rawElements = calendars.getElementPrefs()[calendars.ELEM_CATEGORIES_TODO];

EXDATE

string

Constant for the calendar entry, here for the exceptions for recurrence dates (as dates) where no appointment occurs.


EXRULE

string

Constant for the calendar entry, here for the exception of recurrence dates (as a rule) where no appointment takes place.


FR

string

FREEBUSY

string

Constant for the calendar entry, here for a freeBusy element.


GROUP_MULTI

number

Constant for group appointments, here the system creates an appointment for each employee added.


GROUP_NONE

number

Constant for group appointments, no group appointment is created here.


GROUP_SINGLE

number

Constant for group appointments, here an appointment is created with all the employees added to the system.


HASREMINDER

string

Constant for the calendar entry, here for specifying whether a reminder exists or not.

Example

// beforeSave (SYS_VEVENT)
event[calendars.HASREMINDER] = "false";
var hasReminder = vars.get("$comp.hasreminder");
if (hasReminder == "true")
{
// Absolut nur, wenn auch gesetzt. Default ist relativ
if ( event[calendars.REMINDER_ABSOLUT] == "true")
{
var reminder_date = vars.get("$comp.reminder_date");
if ( reminder_date != "" )
{
event[calendars.HASREMINDER] = "true";
event[calendars.REMINDER_DATE] = reminder_date;
}
}
else
{
var reminder_duration = vars.getString("$comp.reminder_duration");
if ( reminder_duration != "")
{
event[calendars.HASREMINDER] = "true";
event[calendars.REMINDER_DURATION] = reminder_duration;
}
}
}

HOURLY

string

ID

string

Constant for the calendar entry, here for the ID of the entry.

Example

if (vars.getString("$image.editmode") == calendars.MODE_UPDATE)
{
var entry = vars.get("$image.entry");
var recurrenceId = entry[calendars.RECURRENCEID];
if (recurrenceId == undefined) recurrenceId = null;
calendars.removeEntryByUID(calendars.VEVENT, entry[calendars.USER2]["cn"], entry[calendars.ID], recurrenceId);
}

LASTMODIFIED

string

Constant for the calendar entry, here for the last modification date.


LASTMODIFIEDNAME

string

Constant for the calendar entry, here for the name of the user that last modified the event.


string

Constant for the calendar entry, here for the alias of the link.


string

Constant for the calendar entry, here for the database ID of the link.


string

Constant for the calendar entry, here for the frame of the link.


string

Constant for the calendar entry, here for the ID column of the link.


string

Constant for the calendar entry, here for the database table of the link.


string

Constant for the calendar entry, here for the title of the link.


string

Constant for the calendar entry, here for specifying whether links exist or not.


LOCATION

string

Constant for the calendar entry, here for the location of the entry.


MINUTELY

string

MO

string

MODE_INSERT

number

Constant for the calendar modes.

This is available for editing calendar entries as a variable $image.editMode, which shows the mode of the entry, here the NEW mode.

Example

// Either create a new entry or update a existing entry
if (vars.getString("$image.editmode") == calendars.MODE_INSERT)
{
event[calendars.ID] = calendars.insert([event])[0];
vars.set("$image.editmode", calendars.MODE_UPDATE);
}
else
calendars.updateEntry(event);

MODE_UPDATE

number

Constant for the calendar modes.

This is available for editing calendar entries as a variable $image.editMode, which shows the mode of the entry, here the EDIT mode.

Example

// Either create a new entry or update a existing entry
if (vars.getString("$image.editmode") == calendars.MODE_INSERT)
{
event[calendars.ID] = calendars.insert([event])[0];
vars.set("$image.editmode", calendars.MODE_UPDATE);
}
else
calendars.updateEntry(event);

MONTHLY

string

ORGANIZER

string

Constant for the calendar entry, here for organizer of the entry.


ORGANIZER2

string

Constant for the calendar entry, here for the map with all parameters of the organizer.


PARAMVALUE

string

Constant for the calendar entry, here for the parameter value.


PERCENT

string

Constant for the calendar entry, here for the percent that have already been completed.


PRIORITY

string

Constant for the calendar entry, here for the priority of the entry.


RBYDAY

string

RBYHOUR

string

RBYMINUTE

string

RBYMONTH

string

RBYMONTHDAY

string

RBYSECOND

string

RBYSETPOS

string

RBYWEEKNO

string

RBYYEARDAY

string

RCOUNT

string

RDATE

string

Constant for the calendar entry, here for the reminder date.


READ

string

Berechtigung, Lesender Zugriff auf andere Benutzer


RECURRENCEID

string

Constant for the calendar entry, here for the reference to another entry (recurrence date).


REMINDER

string

Constant for the calendar entry, here for the reminder.


REMINDER_ABSOLUT

string

Constant for the calendar entry, here for an absolute date reminder.


REMINDER_ACTION

string

Constant for the calendar entry, here for the reminder action.


REMINDER_DATE

string

Constant for the calendar entry, here for the reminder date.

Example

// beforeSave (SYS_VEVENT)
event[calendars.HASREMINDER] = "false";
var hasReminder = vars.get("$comp.hasreminder");
if (hasReminder == "true")
{
// Absolut nur, wenn auch gesetzt. Default ist relativ
if ( event[calendars.REMINDER_ABSOLUT] == "true")
{
var reminder_date = vars.get("$comp.reminder_date");
if ( reminder_date != "" )
{
event[calendars.HASREMINDER] = "true";
event[calendars.REMINDER_DATE] = reminder_date;
}
}
else
{
var reminder_duration = vars.getString("$comp.reminder_duration");
if ( reminder_duration != "")
{
event[calendars.HASREMINDER] = "true";
event[calendars.REMINDER_DURATION] = reminder_duration;
}
}
}

REMINDER_DURATION

string

Constant for the calendar entry, here for the reminder time before the entry.


REMINDER_LAST

string

Constant for the calendar entry, here for the time of the last reminder.


string

Constant for the calendar entry, indicates to which date a relative query is intended (start/end).


RFREQ

string

RIGHT_READ

number

Constant for the calendar rights, in this case the right to read both appointments and tasks.


RIGHT_READ_APPOINTMENT

number

Berechtigung: Lesen: nur Termine


RIGHT_READ_TASK

number

Berechtigung: Lesen: nur Aufgaben


RIGHT_WRITE

number

Constant for the calendar rights, in this case the right to write both appointments and tasks.


RIGHT_WRITE_APPOINTMENT

number

Constant for the calendar rights, in this case the right to write appointments.


RIGHT_WRITE_TASK

number

Constant for the calendar rights, in this case the right to read tasks.


RINTERVAL

string

RRULE

string

Constant for the calendar entry, here for the retry rule.


RUNTIL

string

RWKST

string

SA

string

SECONDLY

string

SHOW_ALL

number

Calendar mode constant, everything (datePicker, task box, appointment view and user view) will be displayed.


SHOW_CAL

number

Calendar mode constant, which displays the appointment view.

Example

var calGroup = tools.getUsersWithRole("PROJECT_Ressource");
var start = vars.getString("$comp.EVENTSTART");
var end = vars.getString("$comp.EVENTEND");
var newDay = start - datetime.ONE_DAY;
var arr = [];
do{
newDay = eMath.addInt(newDay, datetime.ONE_DAY)
arr.push(newDay)
}
while(newDay < end)
swing.openCalendar(swing.WINDOW_CURRENT, calendars.SHOW_CAL|calendars.SHOW_DATE|calendars.SHOW_USER, calendars.VIEWMODE_DAYS, false, [calGroup], arr, true);

SHOW_DATE

number

Calendar mode constant, where the datePicker is displayed.

Example

var calGroup = tools.getUsersWithRole("PROJECT_Ressource");
var start = vars.getString("$comp.EVENTSTART");
var end = vars.getString("$comp.EVENTEND");
var newDay = start - datetime.ONE_DAY;
var arr = [];
do{
newDay = eMath.addInt(newDay, datetime.ONE_DAY)
arr.push(newDay)
}
while(newDay < end)
swing.openCalendar(swing.WINDOW_CURRENT, calendars.SHOW_CAL|calendars.SHOW_DATE|calendars.SHOW_USER, calendars.VIEWMODE_DAYS, false, [calGroup], arr, true);

SHOW_TASK

number

Calendar mode constant, which displays the task box.


SHOW_USER

number

Calendar mode constant, where the user view is displayed.

Example

var calGroup = tools.getUsersWithRole("PROJECT_Ressource");
var start = vars.getString("$comp.EVENTSTART");
var end = vars.getString("$comp.EVENTEND");
var newDay = start - datetime.ONE_DAY;
var arr = [];
do{
newDay = eMath.addInt(newDay, datetime.ONE_DAY)
arr.push(newDay)
}
while(newDay < end)
swing.openCalendar(swing.WINDOW_CURRENT, calendars.SHOW_CAL|calendars.SHOW_DATE|calendars.SHOW_USER, calendars.VIEWMODE_DAYS, false, [calGroup], arr, true);

SORTSTRATEGY_AFTERDOT

number

Constant for the sorting strategy of the user, in this case is sorted by the first point of a-Z.


SORTSTRATEGY_AUTO

number

Constant for the sorting strategy of the user, in this case is sorted automatically.


SORTSTRATEGY_LASTWORD

number

Constant for the sorting strategy of the users, in this case is sorted by the last word from A-Z.


SORTSTRATEGY_NATURAL

number

Constant for the sorting strategy of the users, in this case is sorted according to the natural sorting from a-Z.

invalid input: 'calendars.setCalendarUser(["Admin"], calendars.RIGHT_READ_TASK, true, calendars.SORTSTRATEGY_NATURAL );'\


SORTSTRATEGY_NONE

number

Constant for the sorting strategy of the users, in this case is sorted according to no strategy.


STATUS

string

Constant for the calendar entry, here for the status of the entry.

Example

// contentProcess of the status ComboBox
if( calendars.getBackendType() != calendars.BACKEND_EXCHANGEWS )
{
result.object( [ [calendars.STATUS_TENTATIVE, translate.text("Vorläufig")] , [calendars.STATUS_CONFIRMED, translate.text("Bestätigt")] , [calendars.STATUS_CANCELLED, translate.text("Abgesagt")] ] );
}
else
{
result.object( [ [calendars.STATUS_TENTATIVE, translate.text("Vorläufig")] , [calendars.STATUS_BUSY, translate.text("Gebucht")] , [calendars.STATUS_OOF, translate.text("Außer Haus")] , [calendars.STATUS_FREE, translate.text("frei")] ] );
}

STATUS_ACCEPTED

string

Constant for the calendar entry, here for the status "accepted".


STATUS_BUSY

string

Constant for the calendar entry, here for the status "busy" (for Exchange only).


STATUS_CANCELLED

string

Constant for the calendar entry, here for the status "cancelled".


STATUS_COMPLETED

string

Constant for the calendar entry, here for the status "completed".


STATUS_CONFIRMED

string

Constant for the calendar entry, here for the status "confirmed".


STATUS_DECLINED

string

Constant for the calendar entry, here for the status "declined".


STATUS_FREE

string

Constant for the calendar entry, here for the status "free" (for Exchange only). A state of free is interpreted as transparency = true. If the DB is used (also for sync) the transparency flag should be set.


STATUS_INPROCESS

string

Constant for the calendar entry, here for the status "in progress".


STATUS_NEEDSACTION

string

Constant for the calendar entry, here for the status "needs action".


STATUS_OOF

string

Constant for the calendar entry, here for the status "out of office" (for Exchange only).


STATUS_TENTATIVE

string

Constant for the calendar entry, here for the status "tentative".


SU

string

SUMMARY

string

Constant for the calendar entry, here for the summary of the entry.

Example

var Entry = calendars.getEntry( id[1], null, id[2],calendars.VEVENT);
Entry[calendars.SUMMARY] = translate.text("Vacation approved");
Entry[calendars.DESCRIPTION] = translate.withArguments("Vacation approved of %0 on %1", [vars.getString("$sys.user"), datetime.toDate(vars.getString("$sys.today"), translate.text("dd.MM.yyyy"))]);
Entry[calendars.CATEGORIES] = text.encodeMS(["Vacation approved"]);
calendars.update(new Array(Entry));

TH

string

TRANSPARENCY

string

Constant for the calendar entry, here for the tranparency.


TRANSPARENCY_OPAQUE

string

Constant for the calendar entry, here for transparency "transparent".


TRANSPARENCY_TRANSPARENT

string

Constant for the calendar entry, here for transparency "opaque".


TU

string

TYPE

string

Constant for the calendar entry, here for the type of the entry.

Example

var event = vars.get("$image.entry");
event[calendars.TYPE] = calendars.VEVENT;
event[calendars.STATUS] = vars.getString("$comp.status");
event[calendars.SUMMARY] = vars.getString("$comp.subject");
event[calendars.LOCATION] = vars.get("$comp.place");
event[calendars.DESCRIPTION] = vars.get("$comp.text");



// Entweder jetzt neu anlegen oder nur updaten
if (vars.getString("$image.editmode") == calendars.MODE_INSERT)
{
event[calendars.ID] = calendars.insert([event])[0];
vars.set("$image.editmode", calendars.MODE_UPDATE);
}
else
calendars.updateEntry(event);

USER

string

Constant for the calendar entry, here for the owner of the entry.

Example

var id = text.decodeFirst(vars.getString("$comp.tbl_vacation"));



Entry = [];
Entry[calendars.TYPE] = calendars.VEVENT;
Entry[calendars.DTSTART] = datetime.toLong(von, "dd.MM.yyyy");
Entry[calendars.DTEND] = String ( eMath.addInt(datetime.toLong(datetime.today(), "dd.MM.yyyy"), datetime.ONE_DAY) );
Entry[calendars.USER] = calendars.getCalendarUser(id[1]);
Entry[calendars.STATUS] = calendars.STATUS_BUSY;
Entry[calendars.CLASSIFICATION] = calendars.CLASSIFICATION_PUBLIC;
calendars.insert([Entry]);

USER2

string

Constant for the calendar entry, here for the map with all the parameters of the owner (of the entry).


VEVENT

number

Constant for calendar entry types.

This constant is equivalent to the values for calendars. Type when editing calendar entries through JDito code. In this case, it is an appointment.

Example

**// Example 1** var id = text.decodeMS( text.decodeFirst(vars.getString("$comp.tbl_Termine")) );
var prompts = [];
prompts["window"] = vars.getString("$sys.currentwindow");
prompts["image"] = vars.getString("$sys.currentimage");
prompts["comp4refresh"] = ["$comp.tbl_Termine"];
if ( id[2] == "undefined" )
id[2] = null;
var user = tools.existUsers(id[1])? id[1] : null;
swing.openCalendarEntryByUID(calendars.VEVENT, user, id[0], id[2], false, prompts);


**//Example 2** var dtstart = datetime.clearTime(pHolidays[i][0]);
var exist = false;
var condition = [];
condition["COUNT"] = "1";
condition["TYPE_1"] = calendars.VEVENT;
condition["START_1"] = String(dtstart);
condition["END_1"] = String ( eMath.addInt( dtstart, datetime.ONE_DAY) );
condition["USER_1"] = pUser;
var entries = calendars.getEntries( condition );

VFREEBUSY

number

Constant for calendar entry types.

This constant is equivalent to the values for calendars. Type when editing calendar entries through JDito code. In this case, it is a freeBusy element.

Example

var condition = new Array();
condition["COUNT"] = "1";
condition["TYPE_1"] = calendars.VFREEBUSY;
condition["USER_1"] = users[u][0];
condition["START_1"] = pStart;
condition["END_1"] = pEnd;
var fbsall = calendars.getEntries(condition);

VIEWMODE_DAYS

number

View mode constant, which displays one or more days.

Example

var calGroup = tools.getUsersWithRole("PROJECT_Ressource");
var start = vars.getString("$comp.EVENTSTART");
var end = vars.getString("$comp.EVENTEND");
var newDay = start - datetime.ONE_DAY;
var arr = [];
do{
newDay = eMath.addInt(newDay, datetime.ONE_DAY)
arr.push(newDay)
}
while(newDay < end)
swing.openCalendar(swing.WINDOW_CURRENT, calendars.SHOW_CAL|calendars.SHOW_DATE|calendars.SHOW_USER, calendars.VIEWMODE_DAYS, false, [calGroup], arr, true);

VIEWMODE_DEFAULT

number

View mode constant, where the last used viewmode is displayed.


VIEWMODE_SCHEDULE

number

View mode constant, where the planning mode is displayed.

Example

var users = swing.getTableDataByAttribute("$comp.tblUsers", swing.ALL);
var userList = new Array();
for(var i = 0; i < users.length; i++)
{
var user = text.decodeMS(users[i][0])[1];
user = user.split("CN:");
userList.push(user[1]);
}
swing.openCalendar(swing.WINDOW_CURRENT , calendars.SHOW_CAL | calendars.SHOW_DATE | calendars.SHOW_USER, calendars.VIEWMODE_SCHEDULE, false , userList, [], true);

VIEWMODE_WEEKS

number

View mode constant, which displays one or more weeks.


VIEWMODE_WORKWEEK

number

View mode constant, which displays one or more work weeks.


VIRTUAL_MEETING_PROVIDER

string

The meeting provider for the calendar event, if set a meeting will be created and linked to this event. See Note that once a meeting has been attached, it cannot be changed or removed.

Example

calendars.VIRTUAL_MEETING_PROVIDER*

VIRTUAL_MEETING_PROVIDER_SKYPE_FOR_BUSINESS

string

VIRTUAL_MEETING_PROVIDER_SKYPE_FOR_CONSUMER

string

VIRTUAL_MEETING_PROVIDER_TEAMS_FOR_BUSINESS

string

VIRTUAL_MEETING_URL

string

Url to the meeting, generated by the meeting provider. This field is only set, if the meeting provider is specified and supports join links.


VTODO

number

Constant for calendar entry types.

This constant is equivalent to the values for calendars.

Type when editing calendar entries through JDito code. In this case, it is a task.

Example

**// Example 1: Inserting an entry** var entry = new Array();
entry[calendars.TYPE] = calendars.VTODO;
entry[calendars.SUMMARY] = "Test Summary";
entry[calendars.DTSTART] = datetime.date();
entry[calendars.DTEND] = datetime.date();
entry[calendars.USER] = calendars.getCalendarUser("admin");
entry[calendars.STATUS] = calendars.STATUS_NEEDSACTION;
entry[calendars.DESCRIPTION] = "Test Description";
logging.show(calendars.insert([entry]));


**// Beispiel 2** var id = text.decodeMS( text.decodeFirst(vars.getString("$comp.tbl_Aufgabe")) );
var entry = calendars.getEntry( id[0], null, id[1],calendars.VTODO);

WE

string

WEEKLY

string

WRITE

string

Berechtigung, Schreibender Zugriff auf andere Benutzer


YEARLY

string