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

    Interface CatalogItemRecordProducer<V>

    interface CatalogItemRecordProducer<V extends VariableTypes = VariableTypes> {
        $id: string | number | ExplicitKey<string>;
        $override?: Record<string, string | number | boolean>;
        active?: boolean;
        allowEdit?: boolean;
        assignedTopics?: (string | Record<"topic">)[];
        availability?: "desktopOnly" | "both" | "mobileOnly";
        availableFor?: (string | Record<"user_criteria">)[];
        canCancel?: boolean;
        catalogs?: (string | Record<"sc_catalog">)[];
        categories?: (string | Record<"sc_category">)[];
        checkedOut?: boolean;
        description?: string;
        hideAddToCart?: boolean;
        hideAddToWishList?: boolean;
        hideAttachment?: boolean;
        hideDeliveryTime?: boolean;
        hideQuantitySelector?: boolean;
        hideSaveAsDraft?: boolean;
        hideSP?: boolean;
        icon?: string;
        image?: string;
        makeItemNonConversational?: boolean;
        mandatoryAttachment?: boolean;
        meta?: string[];
        mobilePicture?: string;
        mobilePictureType?: "desktopPicture" | "mobilePicture" | "noPicture";
        model?: string | Record<"cmdb_model">;
        name: string;
        noSearch?: boolean;
        notAvailableFor?: (string | Record<"user_criteria">)[];
        order?: number;
        owner?: string | Record<"sys_user">;
        picture?: string;
        postInsertScript?:
            | string
            | (
                (
                    producer: RecordProducerContext,
                    current: GlideRecord,
                    cat_item: RecordProducerDefinition,
                ) => void
            );
        protectionPolicy?: "read" | "protected";
        redirectUrl?: "generatedRecord" | "catalogHomePage";
        roles?: (string | Role)[];
        saveOptions?: string;
        saveScript?:
            | string
            | (
                (
                    producer: RecordProducerContext,
                    current: GlideRecord,
                    cat_item: RecordProducerDefinition,
                ) => void
            );
        script?:
            | string
            | ((producer: RecordProducerContext, current: GlideRecord) => void);
        shortDescription?: string;
        showVariableHelpOnLoad?: boolean;
        startClosed?: boolean;
        state?: State;
        table: (keyof Tables) | Table;
        variables?: V;
        variableSets?: { order: number; variableSet: string | VariableSet }[];
        version?: number;
        view?: string | Record<"sys_ui_view">;
        visibleBundle?: boolean;
        visibleGuide?: boolean;
        visibleStandalone?: boolean;
    }

    Type Parameters

    Index

    Properties

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

    Set properties not directly supported by this API.

    active?: boolean

    Check box to make the item active (available to be ordered)

    true
    
    allowEdit?: boolean

    Whether to allow editing of the generated record after creation

    false
    
    assignedTopics?: (string | Record<"topic">)[]

    The assigned topics for the catalog item

    availability?: "desktopOnly" | "both" | "mobileOnly"

    The availability of the catalog item

    'desktopOnly'
    
    availableFor?: (string | Record<"user_criteria">)[]

    The users/groups this item is available for

    canCancel?: boolean

    Whether the user can cancel the record producer submission

    false
    
    catalogs?: (string | Record<"sc_catalog">)[]

    The catalogs the catalog item belongs to

    categories?: (string | Record<"sc_category">)[]

    Category for the item. Categories can only be selected after the Catalogs field is populated.

    checkedOut?: boolean

    The checked out for the catalog item

    description?: string

    The detailed description of the catalog item

    hideAddToCart?: boolean

    Whether add to cart is hidden for the catalog item

    false
    
    hideAddToWishList?: boolean

    Whether wishlist is hidden for the catalog item

    false
    
    hideAttachment?: boolean

    Whether attachments are hidden - cannot be true when mandatoryAttachment is true

    hideDeliveryTime?: boolean

    Whether delivery time is hidden for the catalog item

    false
    
    hideQuantitySelector?: boolean

    Whether quantity selector is hidden for the catalog item

    false
    
    hideSaveAsDraft?: boolean

    Whether save as draft is hidden for the catalog item

    false
    
    hideSP?: boolean

    Whether to hide item from Service Portal

    false
    
    icon?: string

    The icon for the catalog item

    image?: string

    The image for the catalog item

    makeItemNonConversational?: boolean

    Whether to make the item non conversational

    false
    
    mandatoryAttachment?: boolean

    Whether mandatory attachments are required for the catalog item

    meta?: string[]

    Search tags for the catalog item

    mobilePicture?: string

    The mobile picture for the catalog item

    mobilePictureType?: "desktopPicture" | "mobilePicture" | "noPicture"

    Whether to use the mobile picture type

    'desktopPicture'
    
    model?: string | Record<"cmdb_model">

    The model of the catalog item

    name: string

    Name to appear in the catalog. Required.

    noSearch?: boolean

    Whether to exclude this item from portal search results

    false
    
    notAvailableFor?: (string | Record<"user_criteria">)[]

    The users/groups this item is not available for

    order?: number

    The order of the catalog item

    0
    
    owner?: string | Record<"sys_user">

    The owner for the catalog item

    picture?: string

    The picture for the catalog item

    postInsertScript?:
        | string
        | (
            (
                producer: RecordProducerContext,
                current: GlideRecord,
                cat_item: RecordProducerDefinition,
            ) => void
        )

    Script executed AFTER the record is generated. Safe to use current.update() here. Use producer.var_name to access variables. Use cat_item to access the Record Producer definition.

    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.
    redirectUrl?: "generatedRecord" | "catalogHomePage"

    Where to redirect after record creation

    'generatedRecord'
    Options: 'generatedRecord', 'catalogHomePage'
    roles?: (string | Role)[]

    Roles for a catalog item

    saveOptions?: string

    Options for saving the record producer (advanced configuration)

    saveScript?:
        | string
        | (
            (
                producer: RecordProducerContext,
                current: GlideRecord,
                cat_item: RecordProducerDefinition,
            ) => void
        )

    Script executed at every step save in Catalog Builder. Executed BEFORE the main script. Use current to access the GlideRecord.

    script?:
        | string
        | ((producer: RecordProducerContext, current: GlideRecord) => void)

    Server-side script executed BEFORE the record is generated. Use producer.var_name to access variables. Use current to access the GlideRecord being produced. Do NOT use current.update() or current.insert().

    shortDescription?: string

    A short description of the catalog item

    showVariableHelpOnLoad?: boolean

    Whether to show variable help on load

    false
    
    startClosed?: boolean

    Whether to start closed

    false
    
    state?: State

    The state for the catalog item

    table: (keyof Tables) | Table

    Target table name where the record will be created (Required)

    'incident', 'change_request', 'problem'
    
    variables?: V

    The variables for the catalog item

    variableSets?: { order: number; variableSet: string | VariableSet }[]

    The variable sets the catalog item belongs to

    version?: number

    The version of the catalog item

    1
    
    view?: string | Record<"sys_ui_view">

    The view for the catalog item

    visibleBundle?: boolean

    Whether the bundle is visible

    true
    
    visibleGuide?: boolean

    Whether the guide is visible

    true
    
    visibleStandalone?: boolean

    Whether the standalone is visible

    true