Global Methods
Global methods are available from anywhere in an addon script. They represent functionality that is not tied to any specific user interface element. Detailed information on each of the globally accessible functions, including their parameters, purpose, and return values, is below.
CreateDatabaseConnection(string connectionFileName): Creates an external database connection that can be used to query a data source.
CreateManagedDatabaseConnection(): Creates a managed database connection that allows access to the database used by the host application.
ExecuteCommand(string commandName, object args): Executes a form command supported by the current form using the provided args. args can be either a single value or a Lua table of values (ie: {"Detail", 0, ...}).
GetClientImage(string name): Retrieves an Image object corresponding to the name provided from the application resources file.
GetFieldValue(string fieldSource, string fieldName): Retrieves the value of a field (fieldName) on a data source (fieldSource) exposed by the current form.
GetInterfaceManager(): Retrieves the ScriptInterfaceManager associated with the current script.
GetLocalImage(string path) - returns an Image: Retrieves an Image object based on the file provided by the path argument. The path can be either rooted or relative to the script file's location.
GetSetting(string settingName): Retrieves the value of the specified setting from the addon settings. The setting value will automatically be converted to the correct type based on the type specified in the setting's definition.
LogDebug(string message): Writes the message to the debug log. Debug logging needs to be enabled for the client (in ILLiadClient.log.config) before these messages will output to the log file.
Print(DataTable table, string dataSource, string templateDocuments): Prints data from an addon provided table using the provided data source and template documents.
SetFieldValue(string fieldSource, string fieldName, object value): Sets the value of a field (fieldName) on a data source (fieldSource) exposed by the current form to the given value.