GlideSystem - Scoped
-
- UpdatedJan 30, 2025
- 21 minutes to read
- Yokohama
- API reference
The scoped GlideSystem API provides a number of convenient methods to obtain information about the system, the current logged in user, and other system level information.
Many of the GlideSystem methods facilitate the easy inclusion of dates in query ranges, and are most often used in filters and reporting.
Scoped GlideSystem - addErrorMessage(String message)
Adds an error message for the current session.
Name | Type | Description |
---|---|---|
message | String | Message to add. |
Type | Description |
---|---|
void |
Example
Scoped GlideSystem - addInfoMessage(String message)
Adds an info message for the current session. This method is not supported for asynchronous business rules.
Name | Type | Description |
---|---|---|
message | String | Info message to add. |
Type | Description |
---|---|
void |
Example
Scoped GlideSystem - base64Encode(String source)
Creates a base64 string from the specified string.
Name | Type | Description |
---|---|---|
source | String | String to encode. |
Type | Description |
---|---|
String | Encoded base64 string. |
Example
The following code example shows how to call this method.
Scoped GlideSystem - base64Decode(String source)
Returns an ASCII string from the specified base64 string.
Name | Type | Description |
---|---|---|
source | String | A base64 encoded string. |
Type | Description |
---|---|
String | The decoded string. |
Scoped GlideSystem - beginningOfLastMonth()
Returns the date and time for the beginning of last month in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT beginning of last month, in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - beginningOfLastWeek()
Returns the date and time for the beginning of last week in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT beginning of last week, in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - beginningOfNextMonth()
Returns the date and time for the beginning of next month in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT beginning of next month, in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - beginningOfNextWeek()
Returns the date and time for the beginning of next week in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The GMT beginning of next week, in the format yyyy-mm-dd hh:mm:ss. |
Scoped GlideSystem - beginningOfNextYear()
Returns the date and time for the beginning of next year in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT beginning of next year, in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - beginningOfThisMonth()
Returns the date and time for the beginning of this month in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT beginning of this month, in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - beginningOfThisQuarter()
Returns the date and time for the beginning of this quarter in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT beginning of this quarter, in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - beginningOfThisWeek()
Returns the date and time for the beginning of this week in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT beginning of this week, in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - beginningOfThisYear()
Returns the date and time for the beginning of this year in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT beginning of this year, in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - dateGenerate(String date, String range)
Generates a date and time for the specified date in GMT.
Name | Type | Description |
---|---|---|
date | String | Date to generate the GMT for. Format: yyyy-mm-dd |
range | String | Start, end, or a time in the 24 hour format hh:mm:ss. |
Type | Description |
---|---|
String | Generated date and time. If the range is start, the returned value is yyyy-mm-dd 00:00:00. If range is end the return value is yyyy-mm-dd 23:59:59. Format: yyyy-mm-dd hh:mm:ss |
Example
This example shows using dateGenerate() to set the start date when querying records in the Incident table.
Output
Scoped GlideSystem - daysAgo(Number days)
Returns the date and time for a specified number of days ago.
Name | Type | Description |
---|---|---|
days | Number | Integer number of days |
Type | Description |
---|---|
String | GMT in the format yyyy-mm-dd hh:mm:ss |
Example
Scoped GlideSystem - daysAgoEnd(Number days)
Returns the date and time for the end of the day a specified number of days ago.
Name | Type | Description |
---|---|---|
days | Number | Integer number of days |
Type | Description |
---|---|
String | GMT end of the day in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - daysAgoStart(Number days)
Returns the date and time for the beginning of the day a specified number of days ago.
Name | Type | Description |
---|---|---|
days | String | Integer number of days |
Type | Description |
---|---|
String | GMT start of the day in the format yyyy-mm-dd hh:mm:ss |
Example
Scoped GlideSystem - debug(String message, Object parm1, Object parm2, Object parm3, Object parm4, Object parm5)
Writes a debug message to the system log.
Type | Description |
---|---|
void |
Example
Scoped GlideSystem - endOfLastMonth()
Returns the date and time for the end of last month in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT end of last month, in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - endOfLastWeek()
Returns the date and time for the end of last week in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT end of last week, in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - endOfLastYear()
Returns the date and time for the end of last year in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT in format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - endOfNextMonth()
Returns the date and time for the end of next month in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - endOfNextWeek()
Returns the date and time for the end of next week in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - endOfNextYear()
Returns the date and time for the end of next year in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - endOfThisMonth()
Returns the date and time for the end of this month in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - endOfThisQuarter()
Returns the date and time for the end of this quarter in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - endOfThisWeek()
Returns the date and time for the end of this week in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - endOfThisYear()
Returns the date and time for the end of this year in GMT.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - error(String message, Object parm1, Object parm2, Object parm3, Object parm4, Object parm5)
Writes an error message to the system log.
This method accepts up to five variable arguments (varargs) in the message using the Java MessageFormat placeholder replacement pattern.
Type | Description |
---|---|
void |
Example
Scoped GlideSystem - eventQueue(String name, Object instance, String parm1, String parm2, String queue)
Queues an event for the event manager.
Type | Description |
---|---|
void |
Example
Scoped GlideSystem - eventQueueScheduled(String name, Object instance, String parm1, String parm2, Object expiration)
Queues an event in the event manager.
The passed in event schedule information is stored in the Events [sysevent] table. For additional information on events, see Events.
Type | Description |
---|---|
void |
Example
This example shows how to call the method using a GlideRecord, two parameters that are passed to the event script, and a specified time to schedule the event.
Example
This example shows how to call the method using a sys_id and the default values for the optional parameters.
Scoped GlideSystem - executeNow(GlideRecord job)
Executes a job for a scoped application.
You can only use this method on a job in the same application as the script calling this method.
Name | Type | Description |
---|---|---|
job | GlideRecord | Job to run. |
Type | Description |
---|---|
String | Returns the sys_id of the scheduled job. Returns null if the job is global. |
Example
Scoped GlideSystem - generateGUID()
Generates a GUID that can be used when a unique identifier is required.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | A 32-character hexadecimal GUID. |
Example
The following code example shows how to call this method.
Output:
Scoped GlideSystem - getCallerScopeName()
Gets the caller scope name; returns null if there is no caller.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The caller's scope name, or null if there is no caller. |
Example
This example shows two script includes that are set to Accessible from all application scopes. One script include is created within app_scope_a.
Output:
Example
This example shows another script include created within app_scope_b.
Output:
Example
This script can be used within scope app_scope_a to get the scope name of the caller—in this case app_scope_b.
Scoped GlideSystem - getCssCacheVersionString()
Gets a string representing the cache version for a CSS file.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The CSS cache version. |
Example
The following code example shows how to call this method.
Output:
Scoped GlideSystem - getCurrentApplicationId()
Gets the ID of the current application as set using the Application Picker.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The current application's sys_id, or global in none is set. |
Example
Output
Scoped GlideSystem - getCurrentScopeName()
Gets the name of the current scope.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The current scope name. |
Example
The following code example shows how to call this method.
Output:
Scoped GlideSystem - getDateFormat(String)
Returns the date format associated with the current user.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The date format associated with the current user. |
Example
The following example returns the date format associated with the user.
Output:
Scoped GlideSystem - getDateTimeFormat()
Returns the date and time format associated with the current user.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The date and time format associated with the current user. |
Example
The following example returns the format of the date and time that is associated with the user.
Output:
Scoped GlideSystem - getErrorMessages()
Returns the error messages that were added by addErrorMessage() for the session.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
Array of Strings | Error messages associated with the session. |
Scoped GlideSystem - getEscapedMessage(String id, Array args)
Retrieves the specified message from the Message [sys_ui_message] table. If the message
has HTML special characters, replaces them with the corresponding HTML name codes. For example,
&
becomes &
.
If the specified message identifier (Key) exists in the Message [sys_ui_message] table for the current language, the method returns the translated message with all special characters returned as escape sequences. If the specified message identifier does not exist for the current language, then the method returns the English version of the message with all special characters returned as escape sequences. If the message identifier does not exist in the table, then it returns the message ID.
For additional information about the Message table, see Message table.
Name | Type | Description |
---|---|---|
id | String | Message identifier. You can locate this value in the Key field of the Message [sys_ui_message] table. Note the Key field may look exactly like the actual message string. |
args | Array | Optional. List of strings or other values defined by
java.text.MessageFormat that replace the variables within the specified message.
For example: In this example '{0}' is replaced with the content of current.action.name. Note: The passed in values are not
translated. They are inserted verbatim in the message. |
Type | Description |
---|---|
String | UI message with HTML special characters replaced with HTML name codes. |
Example
This example shows the ampersand character being replaced with the equivalent ampersand HTML name code.
Output
Example
This example shows how to replace a single variable within a message and how the < and > symbols in the message are transposed to the corresponding HTML name codes of < and >.
Output
Scoped GlideSystem - getMessage(String id, Array args)
Retrieves translated messages from the Message [sys_ui_message] table to display in a UI.
If the specified message identifier (key) exists in the Message [sys_ui_message] table for the current language, then the method returns the translated message. If the specified message identifier does not exist for the current language, then the method returns the English version of the message. If the message identifier does not exist in the table, then it returns the message ID.
For additional information about the Message table, see Message table
Name | Type | Description |
---|---|---|
id | String | Message identifier. You can locate this value in the Key field of the Message [sys_ui_message] table. Note the Key field may look exactly like the actual message. |
args | Array | Optional. List of strings or other values defined by java.text.MessageFormat that replace the variables within the specified message. For example: In this example '{0}' is replaced with the content of current.action.name. Note: The passed
in values are not translated. They are inserted verbatim in the message. |
Type | Description |
---|---|
String | UI message. |
Example
This example shows the message returned for the current user when Spanish is the current language.
Output:
Example
This example shows how to replace a single variable within a message.
Output:
Example
This example shows how to replace multiple variables within a message.
Output:
Scoped GlideSystem - getProperty(String key, Object alt)
Gets the value of a Glide property. If the property is not found, returns an alternate value.
Name | Type | Description |
---|---|---|
key | String | The key for the property whose value should be returned. |
alt | Object | (Optional) Alternate object to return if the property is not found. |
Type | Description |
---|---|
String | The value of the Glide property, or the alternate object defined above. |
Example
The following code example shows how to call this method.
Output:
Scoped GlideSystem - getSession()
Gets a reference to the current Glide session.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | A reference for the current session. |
Example
Scoped GlideSystem - getSessionID()
Retrieves the GlideSession session ID.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The session ID. |
Example
Scoped GlideSystem - getSessionToken()
This method is no longer available. Instead, use
gs.getSession().getSessionToken()
.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The session token. |
Scoped GlideSystem - getTimeFormat()
Returns the time format associated with the current user.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The time format associated with the current user. |
Example
The following code example shows how to call this method.
Output:
Scoped GlideSystem - getTimeZoneName()
Returns the name of the time zone associated with the current user.
This method has been deprecated. Instead, use the getTimeZoneName() method in the GlideSession API.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The time zone name. |
Example
The following code example shows how to call this method.
Scoped GlideSystem - getUrlOnStack()
Gets the current URI for the session.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The URI. |
Example
Scoped GlideSystem - getUser()
Returns a reference to the scoped GlideUser object for the current user.
See GlideUser - Scopedfor a list of available methods.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
GlideUser | Reference to a scoped user object. |
Example
Output
Scoped GlideSystem - getUserDisplayName()
Gets the display name of the current user.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The name field of the current user. For example, this method returns Abel Tuter as opposed to abel.tuter. |
Example
This example gets the current user's display name.
Output:
Scoped GlideSystem - getUserID()
Gets the sys_id of the current user.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The sys_id of the current user. |
Example
The following example shows how to unassign all active Incident records assigned to the current user.
Output:
Scoped GlideSystem - getUserName()
Returns the user name of the current user.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | The user name of the current user. For example, this method returns abel.tuter as opposed to Abel Tuter. |
Example
This example gets the user name of the current user.
Scoped GlideSystem - hasRole(Object role)
Determines if the current user has the specified role.
Name | Type | Description |
---|---|---|
role | Object | The role to check. |
Type | Description |
---|---|
Boolean | True if the user had the role. Returns true for users with the administrator role. |
Example
Scoped GlideSystem - hoursAgo(Number hours)
Returns the date and time for a specified number of hours ago.
Name | Type | Description |
---|---|---|
hours | Number | Integer number of hours |
Type | Description |
---|---|
String | GMT in the format yyyy-mm-dd hh:mm:ss |
Example
Scoped GlideSystem - hoursAgoEnd(Number hours)
Returns the date and time for the end of the hour a specified number of hours ago.
Name | Type | Description |
---|---|---|
hours | Number | Integer number of hours |
Type | Description |
---|---|
String | GMT in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - hoursAgoStart(Number hours)
Returns the date and time for the start of the hour a specified number of hours ago.
Name | Type | Description |
---|---|---|
hours | Number | Integer number of hours |
Type | Description |
---|---|
String | GMT in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - include(String name)
Provides a safe way to call a script include from the sandbox, allowing only the inclusion of trusted scripts.
Name | Type | Description |
---|---|---|
name | String | Name of the script to include. |
Type | Description |
---|---|
Boolean | Flag that indicates whether the script include worked. Possible values:
|
Example
This example gets the LDAPUtils in the current script context.
Scoped GlideSystem - info(String message, Object parm1, Object parm2, Object parm3, Object parm4, Object parm5)
Writes an info message to the system log.
Type | Description |
---|---|
void |
Example
Scoped GlideSystem - isDebugging()
Determines if debugging is active for a specific scope.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
Boolean | True if either session debugging is active or the log level is set to debug for the specified scope. |
Example
Scoped GlideSystem - isInteractive()
Checks if the current session is interactive. An example of an interactive session is when a user logs in normally. An example of a non-interactive session is using a SOAP request to retrieve data.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
Boolean | True if the session is interactive. |
Example
Scoped GlideSystem - isLoggedIn()
Determines if the current user is currently logged in.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
Boolean | True if the current user is logged in. |
Example
Scoped GlideSystem - isMobile()
You can determine if a request comes from a mobile device.
This method can be used in UI action conditions and business rules.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
Boolean | True if the request comes from a mobile device; otherwise, false. |
Example
Output
Scoped GlideSystem - minutesAgoEnd(Number minutes)
Returns the date and time for the end of the minute a specified number of minutes ago.
Name | Type | Description |
---|---|---|
minutes | Number | Integer number of minutes ago, such as 5 or 126. |
Type | Description |
---|---|
String | GMT the specified number of minutes ago, at the end of the minute (59 seconds).
Format: yyyy-mm-dd hh:mm:ss |
Example
The following example displays the current date and time and the date and time 30 minutes ago at the end of the minute in GMT.
Output:
Scoped GlideSystem - minutesAgoStart(Number minutes)
Returns the date and time for the start of the minute a specified number of minutes ago.
Name | Type | Description |
---|---|---|
minutes | Number | Integer number of minutes ago, such as 15 or 112. |
Type | Description |
---|---|
String | GMT the specified number of minutes ago, at the start of the minute. Format: yyyy-mm-dd hh:mm:ss |
Example
The following example displays the current date and time and the date and time 30 minutes ago at the start of the minute in GMT.
Output:
Scoped GlideSystem - monthsAgo(Number months)
Returns the date and time for a specified number of months ago.
Name | Type | Description |
---|---|---|
months | Number | Integer number of months ago. |
Type | Description |
---|---|
String | GMT of the specified number of months ago at the exact same time. Format: yyyy-mm-dd hh:mm:ss |
Example
The following example displays the current date and time and the date and time one month ago at the same time in GMT.
Output:
Scoped GlideSystem - monthsAgoEnd(Number months)
Returns the date and time for the last day of the month a specified number of months ago.
Name | Type | Description |
---|---|---|
months | Number (Integer) | Number of months, such as 4 or 16. |
Type | Description |
---|---|
String | Date and time stamp of the month, the specified number of months ago, in local time. Format: UTC yyyy-mm-dd hh:mm:ss |
Example
The following example displays the current date and time and the date and time two months ago at the end of the business month.
Output:
Scoped GlideSystem - monthsAgoStart(Number months)
Returns the date and time for the start of the month a specified number of months ago.
Name | Type | Description |
---|---|---|
months | Number | Integer number of months ago, such as 3 or 14. |
Type | Description |
---|---|
String | GMT start of the month the specified number of months ago. Format: yyyy-mm-dd hh:mm:ss |
Example
The following example displays the current date and time and the date and time three months ago in GMT.
Output
Scoped GlideSystem - nil(Object o)
Queries an object and returns true if the object is null, undefined, or contains an empty string.
Name | Type | Description |
---|---|---|
o | Object | The object to check. |
Type | Description |
---|---|
Boolean | True if the object is null, undefined, or contains an empty string; otherwise, returns false. |
Example
Output
Scoped GlideSystem - quartersAgoEnd(Number quarters)
Returns the date and time for the last day of the quarter for a specified number of quarters ago.
Name | Type | Description |
---|---|---|
quarters | Number | Integer number of quarters |
Type | Description |
---|---|
String | GMT end of the quarter that was the specified number of quarters ago, in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - quartersAgoStart(Number quarters)
Returns the date and time for the first day of the quarter for a specified number of quarters ago.
Name | Type | Description |
---|---|---|
quarters | Number | Integer number of quarters |
Type | Description |
---|---|
String | GMT end of the month that was the specified number of quarters ago, in the format yyyy-mm-dd hh:mm:ss |
Scoped GlideSystem - setProperty(String key, String value, String description)
Sets the specified key to the specified value if the property is within the script's scope.
Name | Type | Description |
---|---|---|
key | String | The key for the property to be set. |
value | String | The value of the property to be set. |
description | String | A description of the property. |
Type | Description |
---|---|
void |
Example
The following code example shows how to call this method.
Output:
Scoped GlideSystem - setRedirect(Object o)
Sets the redirect URI for this transaction, which then determines the next page the user will see.
Name | Type | Description |
---|---|---|
o | Object | URI object or URI string to set as the redirect |
Type | Description |
---|---|
void |
Example
Scoped GlideSystem - tableExists(String name)
Determines if a database table exists.
Name | Type | Description |
---|---|---|
name | String | Name of the table to check for existence. |
Type | Description |
---|---|
Boolean | True if the table exists. False if the table was not found. |
Example
This example shows checking whether the incident and foo tables exist in the ServiceNow instance.
Output:
Scoped GlideSystem - urlEncode(String url)
Encodes non-ASCII characters, unsafe ASCII characters, and spaces so the returned string can be used on the Internet. Uses UTF-8 encoding. Uses percent (%) encoding.
Name | Type | Description |
---|---|---|
url | String | The string to encode. |
Type | Description |
---|---|
String | A string with non-ASCII characters, unsafe ASCII characters, and spaces encoded. |
Scoped GlideSystem - urlDecode(String url)
Replaces UTF-8 encoded characters with ASCII characters.
Name | Type | Description |
---|---|---|
url | String | UTF-8 percent (%) encoded characters. |
Type | Description |
---|---|
String | Encoded characters replaced with ASCII characters. |
Scoped GlideSystem - warn(String message, Object parm1, Object parm2, Object parm3, Object parm4, Object parm5)
Writes a warning message to the system log.
Type | Description |
---|---|
void |
Example
Scoped GlideSystem - xmlToJSON(String xmlString)
Takes an XML string and returns a JSON object.
Name | Type | Description |
---|---|---|
xmlString | String | The XML string to be converted. |
Type | Description |
---|---|
Object | A JSON object representing the XML string. Null if unable to process the XML string. |
Example
The following code example shows how to call this method.
Scoped GlideSystem - yearsAgo(Number years)
Returns a date and time for a certain number of years ago.
Name | Type | Description |
---|---|---|
years | Number | An integer number of years |
Type | Description |
---|---|
String | GMT beginning of the year that is the specified number of years ago, in the format yyyy-mm-dd hh:mm:ss. |
Scoped GlideSystem - yesterday()
Returns yesterday's time (24 hours ago).
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
String | GMT for 24 hours ago, in the format yyyy-mm-dd hh:mm:ss |
On this page
- Scoped GlideSystem - addErrorMessage(String message)
- Scoped GlideSystem - addInfoMessage(String message)
- Scoped GlideSystem - base64Encode(String source)
- Scoped GlideSystem - base64Decode(String source)
- Scoped GlideSystem - beginningOfLastMonth()
- Scoped GlideSystem - beginningOfLastWeek()
- Scoped GlideSystem - beginningOfNextMonth()
- Scoped GlideSystem - beginningOfNextWeek()
- Scoped GlideSystem - beginningOfNextYear()
- Scoped GlideSystem - beginningOfThisMonth()
- Scoped GlideSystem - beginningOfThisQuarter()
- Scoped GlideSystem - beginningOfThisWeek()
- Scoped GlideSystem - beginningOfThisYear()
- Scoped GlideSystem - dateGenerate(String date, String range)
- Scoped GlideSystem - daysAgo(Number days)
- Scoped GlideSystem - daysAgoEnd(Number days)
- Scoped GlideSystem - daysAgoStart(Number days)
- Scoped GlideSystem - debug(String message, Object parm1, Object parm2, Object parm3, Object
parm4, Object parm5)
- Scoped GlideSystem - endOfLastMonth()
- Scoped GlideSystem - endOfLastWeek()
- Scoped GlideSystem - endOfLastYear()
- Scoped GlideSystem - endOfNextMonth()
- Scoped GlideSystem - endOfNextWeek()
- Scoped GlideSystem - endOfNextYear()
- Scoped GlideSystem - endOfThisMonth()
- Scoped GlideSystem - endOfThisQuarter()
- Scoped GlideSystem - endOfThisWeek()
- Scoped GlideSystem - endOfThisYear()
- Scoped GlideSystem - error(String message, Object parm1, Object parm2, Object parm3, Object
parm4, Object parm5)
- Scoped GlideSystem - eventQueue(String name, Object instance, String parm1, String parm2,
String queue)
- Scoped GlideSystem - eventQueueScheduled(String name, Object instance, String parm1, String
parm2, Object expiration)
- Scoped GlideSystem - executeNow(GlideRecord job)
- Scoped GlideSystem - generateGUID()
- Scoped GlideSystem - getCallerScopeName()
- Scoped GlideSystem - getCssCacheVersionString()
- Scoped GlideSystem - getCurrentApplicationId()
- Scoped GlideSystem - getCurrentScopeName()
- Scoped GlideSystem - getDateFormat(String)
- Scoped GlideSystem - getDateTimeFormat()
- Scoped GlideSystem - getErrorMessages()
- Scoped GlideSystem - getEscapedMessage(String id, Array args)
- Scoped GlideSystem - getMessage(String id, Array args)
- Scoped GlideSystem - getProperty(String key, Object alt)
- Scoped GlideSystem - getSession()
- Scoped GlideSystem - getSessionID()
- Scoped GlideSystem - getSessionToken()
- Scoped GlideSystem - getTimeFormat()
- Scoped GlideSystem - getTimeZoneName()
- Scoped GlideSystem - getUrlOnStack()
- Scoped GlideSystem - getUser()
- Scoped GlideSystem - getUserDisplayName()
- Scoped GlideSystem - getUserID()
- Scoped GlideSystem - getUserName()
- Scoped GlideSystem - hasRole(Object role)
- Scoped GlideSystem - hoursAgo(Number hours)
- Scoped GlideSystem - hoursAgoEnd(Number hours)
- Scoped GlideSystem - hoursAgoStart(Number hours)
- Scoped GlideSystem - include(String name)
- Scoped GlideSystem - info(String message, Object parm1, Object parm2, Object parm3, Object
parm4, Object parm5)
- Scoped GlideSystem - isDebugging()
- Scoped GlideSystem - isInteractive()
- Scoped GlideSystem - isLoggedIn()
- Scoped GlideSystem - isMobile()
- Scoped GlideSystem - minutesAgoEnd(Number minutes)
- Scoped GlideSystem - minutesAgoStart(Number minutes)
- Scoped GlideSystem - monthsAgo(Number months)
- Scoped GlideSystem - monthsAgoEnd(Number months)
- Scoped GlideSystem - monthsAgoStart(Number months)
- Scoped GlideSystem - nil(Object o)
- Scoped GlideSystem - quartersAgoEnd(Number quarters)
- Scoped GlideSystem - quartersAgoStart(Number quarters)
- Scoped GlideSystem - setProperty(String key, String value, String description)
- Scoped GlideSystem - setRedirect(Object o)
- Scoped GlideSystem - tableExists(String name)
- Scoped GlideSystem - urlEncode(String url)
- Scoped GlideSystem - urlDecode(String url)
- Scoped GlideSystem - warn(String message, Object parm1, Object parm2, Object parm3, Object
parm4, Object parm5)
- Scoped GlideSystem - xmlToJSON(String xmlString)
- Scoped GlideSystem - yearsAgo(Number years)
- Scoped GlideSystem - yesterday()