Convertigo Public Knowledge base

Call a custom Page function from a customAction component

From 'Edit page class' Page sub menu you can add custom function. But how do you call this functions from within a customAction component and how do you pass parameters to it?

In the customAction component, add a variable whose value is set from your target source (Global component, Call Sequence component, Forms element components, etc). From within the customAction, you can write the below code to call your custom Page function:

this['my_function'](vars.response);

Where my_function is the function defined in the Page class:

public my_function(data){ console.log("Call sequence response: " + data); }

And response is the variable name of the CustomAction.

All the variables passed to a customAction can be accessed from within the component in the vars object.

Page functions can only be accessed from within the sa