We have added "Pre Submit" rule in our form. It is getting invoked each time when we navigate through pages clicking "Continue" button. Below is the only code we have in "Click" rule of Continue button.

Form.$Pages.move(true);

Please advise how we can check from where it is getting invoked and how we can invoke those kind of form rules in Click event of buttons.

You could inspect the Form.dialogName property. If the rule is triggered by a click on 'Save and Close', it should contain 'saveconfirm', if it is triggered by a Submit it will be either undefined or an empty string, depending on previous activity.

You can access the dialogName property from inside a pre-submit rule with:

var dialogName = $rootScope.Form.dialogName;

Additionally, you could add your own code at the beginning of other rules to set a flag indicating triggering reason, for example add this at the top of the Click rule of 'Save and Close':

data.$triggeredBy = 'save'

...and add this to the top of a Page Change rule:

data.$triggeredBy = 'backgroundsave';

(Prefixing the variable name with '$' ensures it will not be sent in the form XML data)

If you don't want the trigger the save on page change behavior, you can turn it off in Form Options/Policies: