Submit button is not working in first click

Certified Lead Developer

Hi Champ,

I have a form where I have different milestone and submit button is there in the last milestone. So user can go to any of the milestone at any given point of time during initiation but when they press the submit button, we need to show the validation for all the mandatory fields that we have in the interface. So for validation we are calling a rule which is checking for all mandatory fields that we have in one of the constants and that give us the fileds which are missing and accordingly we are showing the message to user. Now that is working filne ;but getting a strange issue here. When user submitting with giving all details in all milestone and clicking submit button the page is not getting submitted . when we click for the second time it is getting submitted. What I suspect is that for the first time it is only checking the validation and for the second click as there is no validation issue, it is getting submitted. But What I expect is fir the first time itself it will check the validation and if nothing is there it will submit automatically .

I am pasting my code snippet for submit button as below:

submit: if(
toboolean(
local!validationResult.isApAllDetailsCompleted
) = true(),
true(),
false()
),

Note : local!validationResult is the variable which determines if there is any validation error is there or not and this is populated in save into parameter of Button.

  Discussion posts and replies are publicly visible