Mobile Application - Call onSaveButtonTap on Terrasoft.BusinessRuleEvents.ValueChanged

Hi Communtiy,


In mobile, I am able to capture the on change event of any field using Terrasoft.sdk.Model.addBusinessRule and Terrasoft.BusinessRuleEvents.ValueChanged.


Now what I wanted to achieve is, under this I wanted to execute custom function using executeFn: function(record, rule, column, customData, callbackConfig) {}  and explicitly call the onSaveButtonTap: function(element, event). Any idea how to call this function from here? There are 2 parameters which is element and event, where will I get these values to be passed to onSaveButtonTap?


Terrasoft.sdk.Model.addBusinessRule("Account", {

    ruleType: Terrasoft.RuleTypes.Custom,

    triggeredByColumns: ["Notify"],

    events: [Terrasoft.BusinessRuleEvents.ValueChanged],

    executeFn: function(record, rule, column, customData, callbackConfig) {

        var isValid = true;



        //Call the onSaveButtonTap here

         onSaveButtonTap: function(element, event)


        Ext.callback(callbackConfig.success, callbackConfig.scope, [isValid]);




Thanks in advance



Like 0



Hello Fulgen


It's easier to trigger the onSaveButtonTap method from the save click, debug the execution and see what is passed into the element and event. Then simulate the same objects inside the executeFn and pass them as arguments to the onSaveButtonTap call.

Show all comments