Member Junction
    Preparing search index...

    Command to open a resource in the MemberJunction UI.

    This command navigates the user to a specific resource (record, dashboard, report, form, etc.) within the application.

    {
    "type": "open:resource",
    "label": "Open Customer Record",
    "icon": "fa-user",
    "resourceType": "Record",
    "entityName": "Customers",
    "resourceId": "customer-123",
    "mode": "view"
    }
    {
    "type": "open:resource",
    "label": "View Sales Dashboard",
    "icon": "fa-chart-line",
    "resourceType": "Dashboard",
    "resourceId": "sales-dashboard-456"
    }
    interface OpenResourceCommand {
        entityName?: string;
        icon?: string;
        keys?: Record<string, string | number>;
        label: string;
        mode?: "view" | "edit";
        parameters?: Record<string, any>;
        resourceId?: string;
        resourceType: ResourceType;
        type: "open:resource";
    }
    Index

    Properties

    entityName?: string

    Entity name (required for Record type). The exact entity name as defined in MJ metadata. Examples: "Customers", "MJ: AI Agent Runs", "Contacts" Only used when resourceType is 'Record'.

    icon?: string

    Optional Font Awesome icon class to display on the button. Examples: "fa-user", "fa-chart-line", "fa-file-alt"

    keys?: Record<string, string | number>

    Composite (or explicit) primary-key fields for Record type. Keys are entity field names from metadata. When present, these win per field over resourceId. Use this when the entity PK is not a single ID.

    label: string

    Button label shown to the user. Should be clear and action-oriented (e.g., "Open Customer Record", "View Dashboard").

    mode?: "view" | "edit"

    Mode for opening the resource. Only applies to Record type.

    • 'view': Open in view/read-only mode
    • 'edit': Open in edit mode
    parameters?: Record<string, any>

    Optional parameters to pass to the resource. Used for reports (report parameters) and dashboards (filters).

    resourceId?: string

    ID of the resource to open. For Record type with a single primary key: that key's value (entityName is separate). For other types: The resource identifier (dashboard ID, report ID, etc.). Optional on Record when keys supplies the primary key.

    resourceType: ResourceType

    Type of resource to open.

    type: "open:resource"

    Command type identifier