CWTCalendarUtil Class
Utility for working with the Portal Calendar class.
Constructor
CWTCalendarUtil
-
calendar
Parameters:
-
calendar
GlideRecord | PortalCalendar | StringA direct glide reference or SysID for the Calendar with which to interact.
Item Index
Properties
Methods
convert
-
record
Convert a GlideRecord to a standard Javascript object
Parameters:
-
record
GlideRecordThe record to convert to a standard Javascript object
Returns:
The records values as an independent object.
getCalendarJSON
()
Object
Get the key values of the current calendar for managing displaying information regarding it.
Returns:
Describes the minimal details of the current calendar to avoid disclosing unneeded private information such as the owner.
getEvents
-
[published]
-
[featured]
-
[lower]
-
[upper]
Get the events associated with the current calendar (See: this.calendar).
Parameters:
-
[published]
Boolean optionalWhen true, only published events are retrieved.
-
[featured]
Boolean optionalWhen true, only featured events are retrieved.
-
[lower]
GlideDate optionalWhen specified, used as the minimum time for the starting date of an event.
-
[upper]
GlideDate optionalWhen specified, used as the maximum time for the starting date of an event.
Returns:
Array of JSON objects describing the events currently associated with the current calendar sorted by begin date.
hasAccess
()
Check if the current user has access to the currently declared calendar.
isFalse
-
value
Determine if a value should be considered true.
Due to a variety of ways of true/false values being returned by service now, this method exists to level set to a JavaScript boolean value for use.
Returns:
True if the value is considered as trying to be "true", false otherwise.
isFalse
-
value
Determine if a value should be considered false.
Due to a variety of ways of true/false values being returned by service now, this method exists to level set to a JavaScript boolean value for use.
Returns:
True if the value is considered as trying to be "false", false otherwise.
Properties
calendar
GlideRecord | PortalCalendar
The PortalCalendar that this utility is currently associated with for pulling values and performing checks.
toJSONKeys
Object
private
Values for a calendar to cast it to JSON.
Limited values for privacy concerns.
toJSONMap
Object
private
Values for a calendar to cast it to JSON.
Limited values for privacy concerns.