Skip to main content

GetMenuIdOfBuiltInCommand

Description

Gets the MenuItem ID of a built-in command by its command ID and location.

Syntax

// shellFrame points here into the IShellFrame interface
const result = await shellFrame.Commands.GetMenuIdOfBuiltInCommand(
commandId,
commandLocation,
);

Parameters

NameOptionalityTypeDescription
commandIdRequirednumberThe unique identifier for the command.
commandLocationRequiredCommandLocationThe location where the command is placed.

Return type

TypeDescription
Promise < number >The UI ID of the built-in command if found, otherwise throw 'Not Found' error.

Exceptions

ArgumentError - When commandId or commandLocation is null or undefined, or when commandId is not a built-in command.

NotFoundError - When the command is not found or access is denied.