Hello,
I am trying to use the Navigating event on my business object to perform row validation through the CheckRules method. I have set CheckRulesBeforeNavigate to false because I have conditions under which I do not wish to perform the check. Hence the use of the Navigating event to control whether or not I check rules.
Even though I assign e.Cancel to 'true' in the Navigating event, the Navigate() method call on the BO will still return true. I would have expected a false in such a situation, to indicate me I have broken rules. I have stepped through my code and confirm that my Navigating handler gets called and that I indeed assign e.Cancel to true.
Since I had downloaded the SF source code, I have taken a quick look at the Navigate() method call and think I may have put a finger on the problem: the local variable "llIndexMoved" gets initialized to True. But it's not getting reassigned to false anywhere, and the code in the branch
If Not loNavigating.Cancel Then
...
does not get called either, since I have assigned True to the Cancel property in my event handler. So at the end of your method you're entering the
conditional even though no real index move has occured...
Any way of working around this ? Can I expect a fix ?
Thanks for your help.
Marc-Andre