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
anyThe calendar user as an array of objects as returned by calendars.getCalendarUser.
numberThe type of the calendar element, which is affected (VEVENT, VTODO)
anyArray of given permissions (PERMISSION_WRITE, PERMISSION_READ)
anyName of properties, which ca be accessednull for all (only READ supported yet)
booleantrue removes all inactive users from the list.
numberThe sorting strategy see calendars.SORTSTRATEGY_*.
Returns
voidThrows
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
voidThrows
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
numberder Typ des Kalendarelements, für den die Rechte vorhanden sein müssen (VEVENT, VTODO)
string | number | booleandas 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
numberThe 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
numberThe 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
string | number | booleanthe 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
string | number | booleanLogin name of the user.
Returns
stringThe 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
anyThe 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
numberThe 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
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
string | number | booleanThe ID of the calendar entry.
string | number | booleanFor recurring appointments, this ID indicates the element to be edited; 'null' for the mail element. The recurrenceID represents the date as a long.
string | number | booleanThe affected user.
numberThe 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
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
numberStart of the interval that comprises the required elements (date as a "long" value).
numberEnd 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
string | number | booleanID of the calendar entry.
string | number | booleanThe affected user.
numberStart of the interval that comprises the required elements (date as a "long" value).
numberEnd of the interval that comprises the required elements (date as a "long" value).
numberThe 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
numberder Typ des Kalendarelements, für den die Rechte vorhanden sein müssen (VEVENT, VTODO)
string | number | booleandas 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
numberThe 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
string | number | booleanThe 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
numberThe 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
string | number | booleanThe calendar user
numberThe type of the calendar element, which is affected (VEVENT, VTODO)
string | number | booleanChecked permissions (PERMISSION_WRITE, PERMISSION_READ)
Returns
booleantrue 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
string | number | booleanThe text file with the ICS contents.
string | number | booleanThe 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
anyThe entry as a map or NativeArray.
numberFor 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
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
voidThrows
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
anyThe 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
voidThrows
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
anyThe entry as a map or the UID of the element to be deleted. For the structure of the entry, please refer to calendars.insert().
string | number | booleanThe 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
voidThrows
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
numberThe element type. calendars.VTODO for tasks, calendars.VEVENT for appointments.
string | number | booleanThe user associated with the entry (mailbox).
string | number | booleanThe UID of the entry.
string | number | booleanThe 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
voidThrows
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
voidThrows
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
anyThe calendar user as an array of objects as returned by calendars.getCalendarUser.
numberThe 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
voidDeprecated
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")) { var support = tools.getUsersWithRole("PROJECT_Support"); calendars.setCalendarUser( support, calendars.RIGHT_WRITE_TASK | calendars.RIGHT_READ_TASK ); }
Parameters
anyThe calendar user as an array of objects as returned by calendars.getCalendarUser.
numberThe 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.
booleantrue removes all inactive users from the list.
Returns
voidDeprecated
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
anyThe calendar user as an array of objects as returned by calendars.getCalendarUser.
numberThe 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.
booleantrue removes all inactive users from the list.
numberThe sorting strategy see calendars.SORTSTRATEGY_*.
Returns
voidDeprecated
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
booleantrue if a check is to be performed.
Returns
voidThrows
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
string | number | booleanThe calendar process that will be executed automatically when deleting calendar entries. 'null' if no process should be executed.
Returns
voidThrows
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
booleanSpecifies whether unknown users should be ignored (true) or not.
Returns
voidThrows
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
booleanSpecifies whether unknown users should be ignored true or not.
Returns
voidThrows
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
string | number | booleanThe calendar process that will be executed automatically when creating calendar entries. 'null' if no process should be executed.
Returns
voidThrows
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
booleantrue if group appointments may only be changed by the organizer. Can be set in the autostart process of the client, for example.
Returns
voidThrows
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
string | number | booleanThe calendar process that will be executed automatically when a calendar reminder is due. 'null' if no process should be executed.
Returns
voidThrows
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
string | number | booleanThe calendar process that will be executed automatically when changing calendar entries. 'null' if no process should be executed.
Returns
voidThrows
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
numberThe type of calendar entry. calendars.VTODO for tasks, calendar.VEVENT for appointments.
string | number | booleanUser of this entry (mailbox).
string | number | booleanThe ID of the calendar entry.
Returns
stringThe 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
anyThe entry as a map or NativeArray.
Returns
voidThrows
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
anyThe entry as a map. Must contain the UID of the entry.
Returns
voidThrows
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
stringConstant for the calendar entry, here for the users affected by the entry.
ATTENDEES
stringConstant for the calendar entry, here for the attendees of a entry.
BACKEND_CALDAV
numberConstant for calendar backend types, in this case a CalDav-Server is used as backend via a webservice.
BACKEND_DB
numberConstant 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
numberConstant for calendar backend types, in this case Domino via webservice
BACKEND_EXCHANGEWS
numberConstant 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
numberBACKEND_NONE
numberConstant for no active calendar, for use with calendar.getBackendType()
CATEGORIES
stringConstant for the calendar entry, here for the calendar categories.
CLASSIFICATION
stringConstant for the calendar entry, here for the classification of the entry.
CLASSIFICATION_PRIVATE
stringConstant for the calendar entry, here for a private item.
CLASSIFICATION_PUBLIC
stringConstant for the calendar entry, here for a public item.
COMMENT
stringConstant for the calendar entry, here for the comment.
CONDITION_COUNT
stringCalendar search condition constants.
In this case, the number of different search packages is calculated over the different numbers behind the conditions.
CONDITION_ENDTIME
stringConstants for calendar search conditions, here is the end date.
CONDITION_LASTMODIFIED
stringConstants for calendar search conditions, here is the last processing period.
CONDITION_STARTTIME
stringConstants for calendar search conditions, here is the start date.
CONDITION_STATUS
stringConstants for calendar search conditions, here is the status.
CONDITION_TYPE
stringConstants for calendar search conditions, here the type of the entry (calendars.VEVENT or calendars.VTODO).
CONDITION_UID
stringConstants for calendar search conditions, here the unique marking of the calendar entry.
CONDITION_USER
stringCalendar search conditions constants, here the owner of the calendar entry.
CREATED
stringConstant 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
stringDESCRIPTION
stringConstant 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
stringConstant 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
stringConstant for the calendar entry, here for the timestamp.
DTSTART
stringConstant 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
stringConstant for the calendar entry, here for the due date.
DURATION
stringConstant for the calendar entry, here for the duration of the entry.
ELEM_CATEGORIES_EVENT
stringConstant 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
stringConstant 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
stringConstant for the calendar entry, here for the exceptions for recurrence dates (as dates) where no appointment occurs.
EXRULE
stringConstant for the calendar entry, here for the exception of recurrence dates (as a rule) where no appointment takes place.
FR
stringFREEBUSY
stringConstant for the calendar entry, here for a freeBusy element.
GROUP_MULTI
numberConstant for group appointments, here the system creates an appointment for each employee added.
GROUP_NONE
numberConstant for group appointments, no group appointment is created here.
GROUP_SINGLE
numberConstant for group appointments, here an appointment is created with all the employees added to the system.
HASREMINDER
stringConstant 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
stringID
stringConstant 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
stringConstant for the calendar entry, here for the last modification date.
LASTMODIFIEDNAME
stringConstant for the calendar entry, here for the name of the user that last modified the event.
LINK_ALIAS
stringConstant for the calendar entry, here for the alias of the link.
LINK_DBID
stringConstant for the calendar entry, here for the database ID of the link.
LINK_FRAME
stringConstant for the calendar entry, here for the frame of the link.
LINK_IDCOLUMN
stringConstant for the calendar entry, here for the ID column of the link.
LINK_TABLE
stringConstant for the calendar entry, here for the database table of the link.
LINK_TITLE
stringConstant for the calendar entry, here for the title of the link.
LINKS
stringConstant for the calendar entry, here for specifying whether links exist or not.
LOCATION
stringConstant for the calendar entry, here for the location of the entry.
MINUTELY
stringMO
stringMODE_INSERT
numberConstant 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
numberConstant 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
stringORGANIZER
stringConstant for the calendar entry, here for organizer of the entry.
ORGANIZER2
stringConstant for the calendar entry, here for the map with all parameters of the organizer.
PARAMVALUE
stringConstant for the calendar entry, here for the parameter value.
PERCENT
stringConstant for the calendar entry, here for the percent that have already been completed.
PRIORITY
stringConstant for the calendar entry, here for the priority of the entry.
RBYDAY
stringRBYHOUR
stringRBYMINUTE
stringRBYMONTH
stringRBYMONTHDAY
stringRBYSECOND
stringRBYSETPOS
stringRBYWEEKNO
stringRBYYEARDAY
stringRCOUNT
stringRDATE
stringConstant for the calendar entry, here for the reminder date.
READ
stringBerechtigung, Lesender Zugriff auf andere Benutzer
RECURRENCEID
stringConstant for the calendar entry, here for the reference to another entry (recurrence date).
REMINDER
stringConstant for the calendar entry, here for the reminder.
REMINDER_ABSOLUT
stringConstant for the calendar entry, here for an absolute date reminder.
REMINDER_ACTION
stringConstant for the calendar entry, here for the reminder action.
REMINDER_DATE
stringConstant 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
stringConstant for the calendar entry, here for the reminder time before the entry.
REMINDER_LAST
stringConstant for the calendar entry, here for the time of the last reminder.
REMINDER_RELATED
stringConstant for the calendar entry, indicates to which date a relative query is intended (start/end).
RFREQ
stringRIGHT_READ
numberConstant for the calendar rights, in this case the right to read both appointments and tasks.
RIGHT_READ_APPOINTMENT
numberBerechtigung: Lesen: nur Termine
RIGHT_READ_TASK
numberBerechtigung: Lesen: nur Aufgaben
RIGHT_WRITE
numberConstant for the calendar rights, in this case the right to write both appointments and tasks.
RIGHT_WRITE_APPOINTMENT
numberConstant for the calendar rights, in this case the right to write appointments.
RIGHT_WRITE_TASK
numberConstant for the calendar rights, in this case the right to read tasks.
RINTERVAL
stringRRULE
stringConstant for the calendar entry, here for the retry rule.
RUNTIL
stringRWKST
stringSA
stringSECONDLY
stringSHOW_ALL
numberCalendar mode constant, everything (datePicker, task box, appointment view and user view) will be displayed.
SHOW_CAL
numberCalendar 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
numberCalendar 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
numberCalendar mode constant, which displays the task box.
SHOW_USER
numberCalendar 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
numberConstant for the sorting strategy of the user, in this case is sorted by the first point of a-Z.
SORTSTRATEGY_AUTO
numberConstant for the sorting strategy of the user, in this case is sorted automatically.
SORTSTRATEGY_LASTWORD
numberConstant for the sorting strategy of the users, in this case is sorted by the last word from A-Z.
SORTSTRATEGY_NATURAL
numberConstant 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
numberConstant for the sorting strategy of the users, in this case is sorted according to no strategy.
STATUS
stringConstant 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
stringConstant for the calendar entry, here for the status "accepted".
STATUS_BUSY
stringConstant for the calendar entry, here for the status "busy" (for Exchange only).
STATUS_CANCELLED
stringConstant for the calendar entry, here for the status "cancelled".
STATUS_COMPLETED
stringConstant for the calendar entry, here for the status "completed".
STATUS_CONFIRMED
stringConstant for the calendar entry, here for the status "confirmed".
STATUS_DECLINED
stringConstant for the calendar entry, here for the status "declined".
STATUS_FREE
stringConstant 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
stringConstant for the calendar entry, here for the status "in progress".
STATUS_NEEDSACTION
stringConstant for the calendar entry, here for the status "needs action".
STATUS_OOF
stringConstant for the calendar entry, here for the status "out of office" (for Exchange only).
STATUS_TENTATIVE
stringConstant for the calendar entry, here for the status "tentative".
SU
stringSUMMARY
stringConstant 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
stringTRANSPARENCY
stringConstant for the calendar entry, here for the tranparency.
TRANSPARENCY_OPAQUE
stringConstant for the calendar entry, here for transparency "transparent".
TRANSPARENCY_TRANSPARENT
stringConstant for the calendar entry, here for transparency "opaque".
TU
stringTYPE
stringConstant 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
stringConstant 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
stringConstant for the calendar entry, here for the map with all the parameters of the owner (of the entry).
VEVENT
numberConstant 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
numberConstant 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
numberView 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
numberView mode constant, where the last used viewmode is displayed.
VIEWMODE_SCHEDULE
numberView 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
numberView mode constant, which displays one or more weeks.
VIEWMODE_WORKWEEK
numberView mode constant, which displays one or more work weeks.
VIRTUAL_MEETING_PROVIDER
stringThe 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
stringVIRTUAL_MEETING_PROVIDER_SKYPE_FOR_CONSUMER
stringVIRTUAL_MEETING_PROVIDER_TEAMS_FOR_BUSINESS
stringVIRTUAL_MEETING_URL
stringUrl to the meeting, generated by the meeting provider. This field is only set, if the meeting provider is specified and supports join links.
VTODO
numberConstant 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
stringWEEKLY
stringWRITE
stringBerechtigung, Schreibender Zugriff auf andere Benutzer
YEARLY
string