@servicenow/sdk - v4.4.1
    Preparing search index...
    interface sys_script_vtable {
        active: Typed<boolean, { default: true; label: "Active" }>;
        advanced: Typed<boolean, { default: false; label: "Advanced" }>;
        cache_empty_query_results: Typed<
            boolean,
            { default: true; label: "Cache Empty Query Results" },
        >;
        cache_isolation_level: Typed<
            string
            | number,
            {
                default: "USER";
                dropdown: "dropdown_without_none";
                label: "Cache Isolation Level";
            },
        >;
        cache_strategy: Typed<
            string
            | number,
            {
                default: "CACHE_BY_QUERY";
                dropdown: "dropdown_without_none";
                label: "Caching Strategy";
                readOnly: true;
            },
        >;
        cache_ttl: Typed<
            number,
            {
                default: "0";
                label: [
                    {
                        hint: "Cache Time to Live in seconds";
                        label: "Cache TTL";
                        language: "en";
                        plural: "Cache TTLs";
                    },
                ];
            },
        >;
        delete_script: Typed<
            string
            | number,
            {
                columnType: "script_plain";
                default: "(function executeDelete(v_record) { // Parameters: // v_record - a map of field names and values containing (among others) the // sys_id of the record that needs to be deleted on the remote system // v_record.<field_name> - fields in the remote table GlideRecord // v_record.setLastErrorMessage(message) - signal an error // Sample code: // try { // update-external-system; // if (there-was-an-error) { // var message = ...; // v_record.setLastErrorMessage(message); // } // } catch (ex) { // var message = ex.getMessage(); // v_record.setLastErrorMessage(message); // } })(v_record);";
                label: [
                    {
                        hint: "Defines the script used to delete a record on the remote system";
                        label: "Delete script";
                        language: "en";
                        plural: "Delete scripts";
                    },
                ];
                maxLength: 8000;
            },
        >;
        editable: Typed<boolean, { default: false; label: "Editable" }>;
        enhanced_capacity: Typed<
            boolean,
            { default: false; label: "Enhanced Capacity" },
        >;
        flow: Typed<
            | string
            | Record<"sys_hub_flow">
            | ExplicitKey<"sys_hub_flow">
            | TableBrand<"sys_hub_flow">,
            {
                attributes: {
                    allow_public: true;
                    encode_utf8: false;
                    ref_ac_columns: "sys_scope";
                    ref_auto_completer: "AJAXTableCompleter";
                    ref_contributions: "configure_remote_table_flow";
                };
                label: "Flow";
                readOnly: true;
                referenceTable: "sys_hub_flow";
            },
        >;
        insert_script: Typed<
            string
            | number,
            {
                columnType: "script_plain";
                default: "(function executeInsert(v_record) { // Parameters: // v_record is a map of field names and values containing the sys_id of the // record and the fields that need to be inserted in the record on the // remote system (source of data) // v_record.<field_name> - fields in the remote table GlideRecord // v_record.setLastErrorMessage(message) - signal an error // Sample code: // try { // update-external-system; // if (there-was-an-error) { // var message = ...; // v_record.setLastErrorMessage(message); // } // } catch (ex) { // var message = ex.getMessage(); // v_record.setLastErrorMessage(message); // } })(v_record);";
                label: [
                    {
                        hint: "Defines the script used to insert a record on the remote system";
                        label: "Insert script";
                        language: "en";
                        plural: "Insert scripts";
                    },
                ];
                maxLength: 8000;
            },
        >;
        name: Typed<string, { label: "Name"; mandatory: true }>;
        script: Typed<
            string
            | number,
            {
                columnType: "script_plain";
                default: "(function executeQuery(v_table, v_query) { // Parameters: // v_table - object to record response: // v_table.addRow({ ... }) - adds a row to the result set. // keys are the column names of the table definition. // sys_id must be non-empty and uniquely identify each row. // the above rule will be strictly enforced for editable tables, and generate warnings for read-only tables. // sys_id will be supplied to the Update, and Delete scripts to specify the row's identity. // v_query - the query definition: // v_query.getEncodedQuery() - encoded querystring // v_query.getCondition(field) - encoded querystring for the given field (includes field name, operator, and value) // v_query.getParameter(field) - parameter for the given field (only includes value for equality conditions) // v_query.isGet() - whether the query is a single get by sys_id // v_query.getSysId() - parameter for sys_id field // v_query.isTextSearch() - whether the query contains a text query parameter // v_query.getTextSearch() - text search query parameter (internal field name 123TEXTQUERY321) // v_query.getFirstRowWanted() - the first row to include, don't use with caching // v_query.getLastRowWanted() - the last row to include, don't use with caching // v_query.setLastErrorMessage(message) - the message is visible from GlideRecord.getLastErrorMessage() // Sample code: // try { // retrieve-rows-from-external-system; // if (there-was-an-error) { // var message = ...; // v_query.setLastErrorMessage(message); // return; // } // // for (var row in rows) { // v_table.addRow(row); // } // } catch (ex) { // var message = ex.getMessage(); // v_query.setLastErrorMessage(message); // } })(v_table, v_query);";
                label: [
                    {
                        hint: "Defines the script used to populate data";
                        label: "Script";
                        language: "en";
                        plural: "Scripts";
                    },
                ];
                mandatory: true;
                maxLength: 8000;
            },
        >;
        sys_domain: Typed<
            Record<"domain">
            | "global",
            {
                default: "global";
                label: [
                    {
                        hint: "Domain to which the script belongs";
                        label: "Domain";
                        language: "en";
                        plural: "Domains";
                    },
                ];
            },
        >;
        sys_domain_path: Typed<
            string,
            {
                attributes: { case_sensitive: true };
                default: "/";
                label: "Domain Path";
            },
        >;
        sys_id: Typed<
            string,
            {
                label: [{ label: "Sys ID"; language: "en"; plural: "Sys IDs" }];
                primary: true;
            },
        >;
        table: Typed<
            keyof Tables,
            {
                attributes: {
                    allow_public: true;
                    base_start: true;
                    show_table_names_on_label: true;
                    tableChoicesScript: "VScriptableTablePicker";
                };
                label: "Table";
                mandatory: true;
                tableReference: true;
            },
        >;
        update_script: Typed<
            string
            | number,
            {
                columnType: "script_plain";
                default: "(function executeUpdate(v_record, v_changed_fields) { // Parameters: // v_record - a map of field names and values containing the sys_id of the record // v_record.<field_name> - fields in the remote table GlideRecord // v_record.setLastErrorMessage(message) - signal an error // v_changed_fields - a map of field names and values containing the sys_id of the // v_changed_fields.<field_name> - changed fields in the remote table GlideRecord // Sample code: // try { // update-external-system; // if (there-was-an-error) { // var message = ...; // v_record.setLastErrorMessage(message); // } // } catch (ex) { // var message = ex.getMessage(); // v_record.setLastErrorMessage(message); // } })(v_record, v_changed_fields);";
                label: [
                    {
                        hint: "Defines the script used to update a record on the remote system";
                        label: "Update script";
                        language: "en";
                        plural: "Update scripts";
                    },
                ];
                maxLength: 8000;
            },
        >;
    }

    Hierarchy (View Summary)

    Index

    Properties

    active: Typed<boolean, { default: true; label: "Active" }>
    advanced: Typed<boolean, { default: false; label: "Advanced" }>
    cache_empty_query_results: Typed<
        boolean,
        { default: true; label: "Cache Empty Query Results" },
    >
    cache_isolation_level: Typed<
        string
        | number,
        {
            default: "USER";
            dropdown: "dropdown_without_none";
            label: "Cache Isolation Level";
        },
    >
    cache_strategy: Typed<
        string
        | number,
        {
            default: "CACHE_BY_QUERY";
            dropdown: "dropdown_without_none";
            label: "Caching Strategy";
            readOnly: true;
        },
    >
    cache_ttl: Typed<
        number,
        {
            default: "0";
            label: [
                {
                    hint: "Cache Time to Live in seconds";
                    label: "Cache TTL";
                    language: "en";
                    plural: "Cache TTLs";
                },
            ];
        },
    >
    delete_script: Typed<
        string
        | number,
        {
            columnType: "script_plain";
            default: "(function executeDelete(v_record) { // Parameters: // v_record - a map of field names and values containing (among others) the // sys_id of the record that needs to be deleted on the remote system // v_record.<field_name> - fields in the remote table GlideRecord // v_record.setLastErrorMessage(message) - signal an error // Sample code: // try { // update-external-system; // if (there-was-an-error) { // var message = ...; // v_record.setLastErrorMessage(message); // } // } catch (ex) { // var message = ex.getMessage(); // v_record.setLastErrorMessage(message); // } })(v_record);";
            label: [
                {
                    hint: "Defines the script used to delete a record on the remote system";
                    label: "Delete script";
                    language: "en";
                    plural: "Delete scripts";
                },
            ];
            maxLength: 8000;
        },
    >
    editable: Typed<boolean, { default: false; label: "Editable" }>
    enhanced_capacity: Typed<
        boolean,
        { default: false; label: "Enhanced Capacity" },
    >
    flow: Typed<
        | string
        | Record<"sys_hub_flow">
        | ExplicitKey<"sys_hub_flow">
        | TableBrand<"sys_hub_flow">,
        {
            attributes: {
                allow_public: true;
                encode_utf8: false;
                ref_ac_columns: "sys_scope";
                ref_auto_completer: "AJAXTableCompleter";
                ref_contributions: "configure_remote_table_flow";
            };
            label: "Flow";
            readOnly: true;
            referenceTable: "sys_hub_flow";
        },
    >
    insert_script: Typed<
        string
        | number,
        {
            columnType: "script_plain";
            default: "(function executeInsert(v_record) { // Parameters: // v_record is a map of field names and values containing the sys_id of the // record and the fields that need to be inserted in the record on the // remote system (source of data) // v_record.<field_name> - fields in the remote table GlideRecord // v_record.setLastErrorMessage(message) - signal an error // Sample code: // try { // update-external-system; // if (there-was-an-error) { // var message = ...; // v_record.setLastErrorMessage(message); // } // } catch (ex) { // var message = ex.getMessage(); // v_record.setLastErrorMessage(message); // } })(v_record);";
            label: [
                {
                    hint: "Defines the script used to insert a record on the remote system";
                    label: "Insert script";
                    language: "en";
                    plural: "Insert scripts";
                },
            ];
            maxLength: 8000;
        },
    >
    name: Typed<string, { label: "Name"; mandatory: true }>
    script: Typed<
        string
        | number,
        {
            columnType: "script_plain";
            default: "(function executeQuery(v_table, v_query) { // Parameters: // v_table - object to record response: // v_table.addRow({ ... }) - adds a row to the result set. // keys are the column names of the table definition. // sys_id must be non-empty and uniquely identify each row. // the above rule will be strictly enforced for editable tables, and generate warnings for read-only tables. // sys_id will be supplied to the Update, and Delete scripts to specify the row's identity. // v_query - the query definition: // v_query.getEncodedQuery() - encoded querystring // v_query.getCondition(field) - encoded querystring for the given field (includes field name, operator, and value) // v_query.getParameter(field) - parameter for the given field (only includes value for equality conditions) // v_query.isGet() - whether the query is a single get by sys_id // v_query.getSysId() - parameter for sys_id field // v_query.isTextSearch() - whether the query contains a text query parameter // v_query.getTextSearch() - text search query parameter (internal field name 123TEXTQUERY321) // v_query.getFirstRowWanted() - the first row to include, don't use with caching // v_query.getLastRowWanted() - the last row to include, don't use with caching // v_query.setLastErrorMessage(message) - the message is visible from GlideRecord.getLastErrorMessage() // Sample code: // try { // retrieve-rows-from-external-system; // if (there-was-an-error) { // var message = ...; // v_query.setLastErrorMessage(message); // return; // } // // for (var row in rows) { // v_table.addRow(row); // } // } catch (ex) { // var message = ex.getMessage(); // v_query.setLastErrorMessage(message); // } })(v_table, v_query);";
            label: [
                {
                    hint: "Defines the script used to populate data";
                    label: "Script";
                    language: "en";
                    plural: "Scripts";
                },
            ];
            mandatory: true;
            maxLength: 8000;
        },
    >
    sys_domain: Typed<
        Record<"domain">
        | "global",
        {
            default: "global";
            label: [
                {
                    hint: "Domain to which the script belongs";
                    label: "Domain";
                    language: "en";
                    plural: "Domains";
                },
            ];
        },
    >
    sys_domain_path: Typed<
        string,
        {
            attributes: { case_sensitive: true };
            default: "/";
            label: "Domain Path";
        },
    >
    sys_id: Typed<
        string,
        {
            label: [{ label: "Sys ID"; language: "en"; plural: "Sys IDs" }];
            primary: true;
        },
    >
    table: Typed<
        keyof Tables,
        {
            attributes: {
                allow_public: true;
                base_start: true;
                show_table_names_on_label: true;
                tableChoicesScript: "VScriptableTablePicker";
            };
            label: "Table";
            mandatory: true;
            tableReference: true;
        },
    >
    update_script: Typed<
        string
        | number,
        {
            columnType: "script_plain";
            default: "(function executeUpdate(v_record, v_changed_fields) { // Parameters: // v_record - a map of field names and values containing the sys_id of the record // v_record.<field_name> - fields in the remote table GlideRecord // v_record.setLastErrorMessage(message) - signal an error // v_changed_fields - a map of field names and values containing the sys_id of the // v_changed_fields.<field_name> - changed fields in the remote table GlideRecord // Sample code: // try { // update-external-system; // if (there-was-an-error) { // var message = ...; // v_record.setLastErrorMessage(message); // } // } catch (ex) { // var message = ex.getMessage(); // v_record.setLastErrorMessage(message); // } })(v_record, v_changed_fields);";
            label: [
                {
                    hint: "Defines the script used to update a record on the remote system";
                    label: "Update script";
                    language: "en";
                    plural: "Update scripts";
                },
            ];
            maxLength: 8000;
        },
    >