This page is to document scripts that are undocumented in ServiceNow.
Server-Side APIs (gathered using
Xplore
manually and via posts on community)Glide
- get()
- checkInitiated()
GlideAbstractBucketCollector -- Expects Object
GlideSysAttachmentInputStream
GlideChecksum
- calculateMD5CheckSum.
GlideSecurityManager
- setUser
GlideTableCreator
GlideappCatalogItem
GlideappQuestion -- Memory Leak issues
(PRB697208)GlideappVariablePoolQuestionSet
- generally used to print out variables and answers in email. I recommend: /printing-out-variables/
- https://community.servicenow.com/thread/284468 -- not working in scoped application
- https://community.servicenow.com/thread/221479 -- controlling what variables show up
GlideZipOutputStream aka Packages.java.util.zip.ZipOutputStream
GlideZipEntry aka Packages.java.util.zip.ZipEntry
GlideRecord.applyEncodedQuery -- found in activity definitions
- This applies an encoded query to a record and sets it's values.
task.wf_activity
- Note: the wf_activity field is disabled in the dictionary, so is not visible in the form or list views. But it's still valid to use in a script.
- Clearing this out on tasks when "restarting" workflow will reuse tasks, if you clear this out, it will make new.
- I had a ask where a customer wanted a "Revert to New" UI Action inside a Change record but wanted to keep the history of Closed Incomplete Change Tasks to show that a change failed and had to be restarted
Every time I'd restart the workflow it would re-use the last made change tasks and overwrite information that we wanted to keep for history's sake. -- Lee Hollister
GlideTemplate
GlideTemplate.get
GlideMutex
- https://community.servicenow.com/message/953897
- exclusiveWithSpin
- get()
- getExclusiveWithSpin()
- getNonExclusive()
- getWithSpin()
- invalidate()
- nonExclusive
- withSpin
Client-Side APIs
- getDateFromFormat
g_form (mobile/service portal)
- setVariablesReadOnly
Client-Side Properties
- g_user_date_format
- g_user_date_time_format
REST APIS
- Search Endpoint:
/now/globalsearch/search?sysparm_search=TERMGOESHERE&sysparm_groups=SYSIDOFSEARCHGROUP
Header:header: application/json
- Search Endpoint:
Inspiration/Resources; Undocumented Scripts by SN Pro Tips