Previous Topic

Next Topic

Book Contents

Book Index

ExecuteAction - MaxBasic Function

ExecuteAction(ActionText: String): Boolean

Execute Action function runs an Action Bar entry by its text, exactly as if you typed that text into the Action Bar and pressed Enter. The same permission checks apply as when you use the Action Bar.

ExecuteAction function syntax has these named arguments:

Parameter

Description

ActionText

Required. The text of the Action Bar entry to run, for example "Show Banking Summary".

Returns True when a record, list or form was opened, and False otherwise. ExecuteAction returns False when the text matches more than one entry, when it matches several records by word search, and when the action could not be run. No selection list and no Word Lookup window is shown.

Use ActionResultKind to test which of these happened, ActionMessage to read the message when the action could not be run, and ActionMatches to read the matched records.

For example:

Dim Opened as Boolean

Opened = ExecuteAction("Show Banking Summary")