GlideSystem Flashcards
The scoped GlideSystem (referred to by the variable name 'gs' in any server-side JavaScript) API provides a number of convenient methods to get information about the system, the current logged in user, etc. Many of the GlideSystem methods facilitate the easy inclusion of dates in query ranges, and are most often used in filters and reporting.
What does gs stand for?
GlideSystem
What type of information does gs give you access to?
Provides a number of convenient methods to get information about the system, the current logged in user, etc.
Many of the GlideSystem methods facilitate the easy inclusion of dates in query ranges, and are most often used in filters and reporting.
Adds an error message for the current session in Server Script
gs.addErrorMessage(String message)
Adds an info message for the current session in Server Script (This method is not supported for asynchronous business rules)
gs.addInfoMessage(String message)
Decodes a base64 string in Server Script
gs.base64Decode(String source)
Encodes into a base64 string in Server Script
gs.base64Encode(String source)
Returns the date and time for the beginning of last month in GMT in Server Script
gs.beginningOfLastMonth()
Returns the date and time for the beginning of last week in GMT in Server Script
gs.beginningOfLastWeek()
Returns the date and time for the beginning of next month in GMT in Server Script
gs.beginningOfNextMonth()
Returns the date and time for the beginning of next week in GMT in Server Script
gs.beginningOfNextWeek()
Returns the date and time for the beginning of next year in GMT in Server Script
gs.beginningOfNextYear()
Returns the date and time for the beginning of this month in GMT in Server Script
gs.beginningOfThisMonth()
Returns the date and time for the beginning of this quarter in GMT in Server Script
gs.beginningOfThisQuarter()
Returns the date and time for the beginning of this week in GMT in Server Script
gs.beginningOfThisWeek()
Returns the date and time for the beginning of this year in GMT in Server Script
gs.beginningOfThisYear()
Generates a date and time for the specified date in GMT in Server Script
gs.dateGenerate(String date, String range)
Returns the date and time for a specified number of days ago in Server Script
gs.daysAgo(Number days)
Returns the date and time for the end of the day a specified number of days ago in Server Script
gs.daysAgoEnd(Number days)
Returns the date and time for the beginning of the day a specified number of days ago in Server Script
gs.daysAgoStart(Number days)
Writes a debug message to the system log in Server Script
gs.debug(String message, Object parm1, Object parm2, Object parm3, Object parm4, Object parm5)
Returns the date and time for the end of last month in GMT in Server Script
gs.endOfLastMonth()
Returns the date and time for the end of last week in GMT in Server Script
gs.endOfLastWeek()
Returns the date and time for the end of last year in GMT in Server Script
gs.endOfLastYear()
Returns the date and time for the end of next month in GMT in Server Script
gs.endOfNextMonth()
Returns the date and time for the end of next week in GMT in Server Script
gs.endOfNextWeek()
Returns the date and time for the end of next year in GMT in Server Script
gs.endOfNextYear()
Returns the date and time for the end of this month in GMT in Server Script
gs.endOfThisMonth()
Returns the date and time for the end of this quarter in GMT in Server Script
gs.endOfThisQuarter()
Returns the date and time for the end of this week in GMT in Server Script
gs.endOfThisWeek()
Returns the date and time for the end of this year in GMT in Server Script
gs.endOfThisYear()
Writes an error message to the system log in Server Script
gs.error(String message, Object parm1, Object parm2, Object parm3, Object parm4, Object parm5)