CallMacro

This function is used to call any transaction macro and pass in the required passing parameters. It returns True if the macro was successfully completed. These macros can be created from the Solutions Explorer > Transactions Tree. See also App.MacroName.

Group: Application-Based Extension


Syntax: enValue = App.CallMacro(sMacroName, bQueueOffline, [vParams])

enValue               (enMacroResult) – Values are:
MacroFailed
MacroNotProcessed
MacroQueued
MacroSucceeded

sMacroName        (String) – This is the name of the macro to be called.

bQueueOffline      (Boolean) – This determines whether the macro can be queued for later processing if the host is not currently available.

vParams              (Variant) – Optional: A series of passing parameters as required by the selected macro. Note: these parameters are the fields you defined when you wrote the macro.

Example:

Dim enValue As enMacroResult

enValue = App.CallMacro("SaveData", True, "Sam", "2")

Version Supported:       RFgen 4.0, 4.1, 5.0, 5.1, 5.2 and newer.