@servicenow/sdk - v4.7.0
    Preparing search index...
    type SPMenuItemConfig = {
        active?: boolean;
        catItem?: string | Record<"sc_cat_item">;
        color?: BootstrapColor;
        condition?: string;
        display1?: string;
        display2?: string;
        displayDate?: DisplayDate;
        filter?: string;
        glyph?: string;
        hint?: string;
        kbArticle?: string | Record<"kb_knowledge">;
        kbCategory?: string | Record<"kb_category">;
        kbTopic?: Topic;
        label: string;
        order?: number;
        page?: PageRef;
        roles?: (string | Role | Record<"sys_user_role">)[];
        scCategory?: string | Record<"sc_category">;
        script?: ((...args: any[]) => any) | string;
        shortDescription?: string;
        table?: TableName;
        type?: MenuType;
        url?: string;
        urlTarget?: string;
    }
    Index

    Properties

    active?: boolean

    Whether this menu item is rendered in the portal navigation. Set to false to hide without deleting.

    catItem?: string | Record<"sc_cat_item">

    Service Catalog item (sc_cat_item) this item links to directly. Only used when type is 'sc_cat_item'.

    Bootstrap contextual color applied to the menu item. Valid values: 'default', 'primary', 'success', 'info', 'warning', 'danger'.

    condition?: string

    GlideRecord encoded query condition evaluated server-side to determine whether this menu item is visible to the current user.

    'active=true^roles=admin'
    
    display1?: string

    Field name from table to display as the primary label for each filtered record. Only used when type is 'filtered'.

    display2?: string

    Field name from table to display as a secondary label for each filtered record. Only used when type is 'filtered'.

    displayDate?: DisplayDate

    Date field from table to display alongside each filtered record. Valid values: 'sys_created_on', 'sys_updated_on', '' (none). Only used when type is 'filtered'.

    filter?: string

    Encoded query string used to filter records from table. Only used when type is 'filtered'.

    'active=true^category=software'
    
    glyph?: string

    FontAwesome icon class (without the fa- prefix) displayed alongside the menu item label.

    'home', 'list', 'question-circle'
    
    hint?: string

    Tooltip text shown on hover over the menu item.

    kbArticle?: string | Record<"kb_knowledge">

    Specific knowledge article (kb_knowledge) the item links to. Only used when type is 'kb_article'.

    kbCategory?: string | Record<"kb_category">

    Knowledge Base category (kb_category) the item links to. Only used when type is 'kb_category'.

    kbTopic?: Topic

    Knowledge Base topic the item links to. Valid values: 'Policies', 'Applications', 'General', 'FAQ', 'Desktop', 'News', 'Email'. Only used when type is 'kb_topic'.

    label: string

    Display text for the menu item shown in the portal navigation.

    order?: number

    Sort order of the item within its level (top-level or child items). Lower values appear first (leftmost / topmost).

    100
    
    page?: PageRef

    Portal page to navigate to when the item is clicked. Required for types: 'page', 'sc_category', 'sc_cat_item', 'kb_topic', 'kb_article', 'kb_category'.

    roles?: (string | Role | Record<"sys_user_role">)[]

    Restricts visibility of this menu item to users with at least one of the specified roles. If empty, the item is visible to all users who can access the portal.

    scCategory?: string | Record<"sc_category">

    Service Catalog category (sc_category) this item links to. Only used when type is 'sc_category'.

    script?: ((...args: any[]) => any) | string

    Server-side script that dynamically generates child menu items at runtime. Must return an array of item objects. Only used when type is 'scripted'. Consider using Now.include() to move the script to a separate .js file.

    shortDescription?: string

    Admin-facing description of the menu item's purpose. Not displayed in the portal UI.

    table?: TableName

    ServiceNow table name from which filtered records are displayed as child items. Only used when type is 'filtered'.

    type?: MenuType

    Controls what the menu item links to or displays:

    • 'page' — links to an sp_page within the portal.
    • 'url' — links to an arbitrary internal or external URL.
    • 'sc_category' — links to a Service Catalog category listing page.
    • 'sc_cat_item' — links directly to a specific catalog item.
    • 'kb_topic' — links to a Knowledge Base topic.
    • 'kb_article' — links to a specific knowledge article.
    • 'kb_category' — links to a Knowledge Base category.
    • 'filtered' — displays a filtered list of records from any table.
    • 'scripted' — dynamically generates child items via a server-side script.
    'page'
    
    url?: string

    Destination URL for the menu item. Supports absolute and relative URLs. Only used when type is 'url'.

    'https://example.com', '/nav_to.do?uri=incident_list.do'
    
    urlTarget?: string

    HTML <a target> attribute controlling how the URL is opened. Only used when type is 'url'.

    '_blank' (new tab), '_self' (same tab)