Skip to main content


 

Symptoms


Suppose you are trying to implement typical scenario where date 1 needs to be before date 2. In some scenarios, you may actually have something more complex like 3 or 4 dates where date 2 must be past date 1 and date 3 and 4 needed to be after date 1 and before date 2.
In case you implementing this logic using 'OnChange' on all those calendar controls this works correctly if you ENTER dates on the form, but not if you load them from an SMO.
 

Diagnoses


The reason for the loading from SMO is not working is because the OnChange will fire /before/ all the values are populated.
 

Resolution

If you simply implement a rule that does all the validation, then you can execute this rule AFTER the loading or before the form/view validation. This would resolve any issues that you would have with loading the view and the OnChange events firing asynchronously.




 
Be the first to reply!

Reply