Undocumented Scripts
Jace's Blog
·
Oct 01, 2017
·
article
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()
- get()
- GlideAbstractBucketCollector -- Expects Object
- GlideSysAttachmentInputStream
- GlideChecksum
- calculateMD5CheckSum.
- calculateMD5CheckSum.
- GlideSecurityManager
- setUser
- 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
- generally used to print out variables and answers in email. I recommend: /printing-out-variables/
- 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.
- 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
- 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.
- GlideTemplate
- GlideTemplate.get
- GlideMutex
- https://community.servicenow.com/message/953897
- exclusiveWithSpin
- get()
- getExclusiveWithSpin()
- getNonExclusive()
- getWithSpin()
- invalidate()
- nonExclusive
- withSpin
- https://community.servicenow.com/message/953897
- Glide
- Client-Side APIs
- UINotification aka NotificationMessage
- Event
- service.dateUtils.js
- getDateFromFormat
- getDateFromFormat
- g_form (desktop)
- g_form (mobile/service portal)
- setVariablesReadOnly
- setVariablesReadOnly
- Client-Side Properties
- calendar.js
* g_user_date_format
* g_user_date_time_format
- calendar.js
- UINotification aka NotificationMessage
- 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
View original source
https://jace.pro/post/2017-09-30-undocumented-scripts/