Skip to main content

Calling a Function

A function thus created can be called from any module to be executed in response to a task. The syntax to call a function is,

new NameSpace("Namespace").function_name(arguments, ...);

For example, we can consider a scenario, where serviceautofill function grouped under assetfilter namespace is called from the Vendor Contact module in response to the Vendor field update (that is, selecting a vendor) while creating a vendor contact.

As a result of execution of the script, the services rendered (that is, the options listed in the Authorized Services dropdown field) are autofiltered with respect to the vendor selected.

You can read the Configure Action section in the Managing Modules feature for details on how to configure script in response to a task.