logo

NJP

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()
    • GlideAbstractBucketCollector -- Expects Object
    • GlideSysAttachmentInputStream
    • GlideChecksum
      • calculateMD5CheckSum.
    • GlideSecurityManager
      • setUser
    • GlideTableCreator
    • GlideappCatalogItem
    • GlideappQuestion -- Memory Leak issues (PRB697208)
    • GlideappVariablePoolQuestionSet
    • 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
  • Client-Side APIs
  • REST APIS
    • Search Endpoint:
      /now/globalsearch/search?sysparm_search=TERMGOESHERE&sysparm_groups=SYSIDOFSEARCHGROUP
      Header: header: application/json

Inspiration/Resources; Undocumented Scripts by SN Pro Tips

View original source

https://jace.pro/post/2017-09-30-undocumented-scripts/