i2 Notebook SDK
Search results for

    Show/hide table of contents

    Home > @i2analyze/notebook-sdk > commands > ICommandConfig > onExecute

    commands.ICommandConfig.onExecute() method

    Runs when the command is executed.

    Signature:

    onExecute(...args: TCommandType extends 'unscoped' ? [invocationContext?: CommandExecutePayloadMap['unscoped']] : [payload: CommandExecutePayloadMap[TCommandType]]): void;
    

    Introduced: version 1.0

    Parameters

    Parameter Type Description
    args TCommandType extends 'unscoped' ? [invocationContext?: CommandExecutePayloadMap['unscoped']] : [payload: CommandExecutePayloadMap[TCommandType]] The command payload for "records" and "application" commands, or the optional invocation context for "unscoped" commands, as determined by the command type.

    Returns:

    void

    Remarks

    For "records" and "application" commands, the single payload argument combines the base payload for the command type with the commands.ICommandInvocationContext that describes where and how the command was triggered. For "unscoped" commands the invocation context is the only argument and is optional, so the callback can be defined and invoked with no arguments.

    In this article
    Back to top © N. Harris Computer Corporation