Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

There are two different types of script environments available in the addon system. There is the Form Script Environment, which is used for addons that require a user interface consisting of forms and form elements, and the System Script Environment, which is used for addons that are meant to be executed by services or run silently without user interaction in a form-based application. The two different types of script environments each have their own set of methods that are available for use by addon scripts, in addition to several methods that are common to all script environments. Below, you will find links to a list of methods available for each script environment type, as well as a link to a list that represents the methods that are available to all script environments.

...

The System Script Environment is used for addons that have a type of "System" or "Server", with the exception of the ProcessDataContexts method, which can only be used with server addons. 

  • ProcessDataContexts(string contextIDType, object contextIDs, string methodName): Initiates iterative processing of a list of data contexts that match the parameters specified by the contextIDType and contextIDs. The third parameter, methodName, represents the name of a callback method that is called for each data context. Inside of the callback method, all methods that operate on a script-managed data source (GetFieldValue, SetFieldValue, and SaveDataSource) will operate on the data context currently being processed. Data contexts can include multiple pieces of information such as the Transaction, User, and Lender associated with a given transaction number. The list of valid context id types will vary based on the context in which the addon is running. An example of how this method is used, as well as a list of the context types allowed can be found by referencing the Processing Data Contexts topic. The contextIDs parameter can be either a single value or a Lua table of values (ie: {15631, 19867, ...}).

    Info
    The ProcessDataContexts method can only be used with server addons. It is not compatible with system addons.


    DirectionNameDescription
    InputcontextIDTypeThe context ID type that should be used when retrieving the list of data contexts to be processed.
    InputcontextIDsA context ID or list of context IDs that should be used when retrieving the list of data contexts to be processed.
    InputmethodNameThe name of the Lua method that should be used as the callback method for processing each data context.


  • RegisterSystemEventHandler(string eventName, string handlerName): Registers the method identified by the handlerName parameter as an event handler for the system event identified by the eventName parameter.  Registered handlers will be called each time the host application fires the handler's corresponding event.  When an event is fired, any pieces of data related to the event are treated as system managed data sources and can be modified using the same methods as other system managed data sources (GetFieldValue, SetFieldValue and SaveDataSource). For a list of events for which addons may register, see the Handling System Events topic. Only one addon withhwith a type of system can register for a given system event. Attempting to register for an event for which another system addon is already registered will result in an error. Server addons are not subject to this limitation.

    DirectionNameDescription
    InputeventNameThe name of the event for which to register.
    InputhandlerNameThe name of the Lua method that will act as the event handler.
    RemoveSystemEventHandler(string eventName): Removes
    the
    registration for a previously registered
    event handler
    .
    DirectionNameDescription
    InputeventNameThe name of the event for which the registration should be removed.


  • SaveDataSource(string dataSource): Saves a modified system managed data source.

    DirectionNameDescription
    InputdataSourceThe name of the data source to be saved.