It is a collection of methods, executes server-side and has access system-level information.
GlideSystem API
Returns information about the currently logged in user.
User Methods
Retrieves the current user object
gs.getUser()
Gets the username of the current user
gs.getUserName()
Retrieves the ID of the current user
gs.getUserID()
Gets the display name of the current user
gs.getUserDisplayName()
Checks if the current user has a specific role
gs.hasRole()
Checks if the current user has a role in a specified group
gs.hasRoleInGroup()
Primarily work with form objects, tables, fields, and logging
System Methods
Gets the value of a specified system property
gs.getProperty()
Retrieves the display column name for a given table and column name
gs.getDisplayColumn()
Checks if a specified table exists in the system
gs.tableExists()
Used to check for null or empty values
gs.nil()
Prints messages to the system log
gs.print()
Logs informational messages
gs.info()
Logs messages with default log level
gs.log()
Returns the start and end of the last calendar week relative to the current date.
gs.beginningOfLastWeek() and gs.endOfLastWeek():
Returns the start and end of the next calendar month relative to the current date.
gs.beginningOfNextMonth() and gs.endOfNextMonth()
Returns the current date and time in UTC as a string (e.g., “2024-09-09 14:25:00”).
gs.now()
Returns the current date and time in UTC, similar to gs.now(). Used here for clarity.
gs.nowDateTime()
Returns the date and time for a specified number of minutes ago from the current time.
gs.minutesAgo()
Returns the date and time for a specified number of quarters (approximately 3 months) ago.
gs.quartersAgo()
Returns the date and time for a specified number of months ago.
gs.monthsAgo()
Returns the date and time for a specified number of years ago.
gs.yearsAgo()