@servicenow/sdk - v4.7.0
    Preparing search index...

    Interface ScriptIncludeOptions

    interface ScriptIncludeOptions {
        $id: string | number | ExplicitKey<string>;
        $meta?: { installMethod?: "first install" | "demo" | "once" };
        $override?: Record<string, string | number | boolean>;
        accessibleFrom?: "public" | "package_private";
        active?: boolean;
        apiName?: `${string}.${string}`;
        callerAccess?: "tracking" | "restriction";
        clientCallable?: boolean;
        description?: string;
        mobileCallable?: boolean;
        name: string;
        protectionPolicy?: "read" | "protected";
        sandboxCallable?: boolean;
        script: string;
    }
    Index

    Properties

    $id: string | number | ExplicitKey<string>
    $meta?: { installMethod?: "first install" | "demo" | "once" }

    Type Declaration

    • OptionalinstallMethod?: "first install" | "demo" | "once"

      Map a record to an output folder that loads only in specific circumstances. 'first install' -> 'unload' (only loaded when plugin is first registered), 'demo' -> 'unload.demo' (only loaded when demo data is loaded), 'once' -> 'apply_once' (scripts that are only applied once)

    $override?: Record<string, string | number | boolean>

    Set properties not directly supported by this API.

    accessibleFrom?: "public" | "package_private"

    Sets which applications can access this script include.

    • public: All application scopes
    • package_private: This application scope only (default)
    active?: boolean

    Enable or disable the script include

    apiName?: `${string}.${string}`

    The internal name of the Script Include. Used to call the Script Include from out-of-scope applications. If not populated it will default to {scope}.{name}.

    callerAccess?: "tracking" | "restriction"

    Allow scoped applications to restrict access to this script include.

    • restriction: Do not allow access unless an admin approves access by the scope.
    • tracking: Allow access but track which scopes access the Script Include.

    Note: Only effective when accessibleFrom is set to 'public'. Ignored by the platform otherwise.

    clientCallable?: boolean

    The script include can be called from client-side scripts using GlideAjax.

    description?: string

    Documentation explaining the purpose and function of the Script Include

    mobileCallable?: boolean

    The script include is available to client scripts called from mobile devices.

    name: string

    The name of the script include. If you are defining a class, this must match the name of the class, prototype, and type. If you are using a classless (on-demand) script include, the name must match the function name.

    protectionPolicy?: "read" | "protected"

    Controls edit/view access for other developers after the application is installed.

    • read: Others can see the script logic but not change it.
    • protected: Others cannot change this record.
    • Omit to allow other developers to customize this record.
    sandboxCallable?: boolean

    The script include is available to scripts invoked from the script sandbox, such as a query condition.

    script: string

    Defines the server side script to run when called from other scripts. The script must define a single JavaScript class or a global function. The class or function name must match the Name field. Consider using Now.include() to move the script to a separate js file