Skip to main content
A newer version of this page is available. .

GoToDataRecordCommand.execute(activeRecordIndex) Method

Executes the GoToDataRecordCommand command by applying the specified setting.

May result in taking no action if the command’s state does not allow command execution. Use the object’s getState method to check the command state.

Declaration

execute(
    activeRecordIndex: number
): boolean

Parameters

Name Type Description
activeRecordIndex number

An integer value specifying index of the next data record.

Returns

Type Description
boolean

A Boolean value identifying whether method execution was successful or failed.

Remarks

The execute method checks the command state (obtained using the getState method) before executing, and decides whether the action can be performed.

Usage example:


richEdit.commands.goToDataRecord.execute(3);

Use the GoToDataRecordCommand.getState method to get the DataRecordOptions object containing the total number of records and the index of the active record.

See Also