Ok, here is my problem with this:
Before the custom save handler is envoked, this Yes / No dialog box
described below is invoked. I need to learn how to avoid this. We have a
scenario where the form overall may have errors, but we only care about
certain views which are applicable only under certain conditions. So
basically, is there any way to turn off this validation warning which shows
up prior to the actual save handler?
> Im sure by now you have the answer, but for anyone else who has this question:
>
[quoted text clipped - 17 lines]
> >
> > Thanks
Alex [MSFT] - 29 Jun 2005 07:16 GMT
Simply modify all your validation expressions to include another variable:
(your expression) AND doCheck = 1
Then, when in your Save handler, set doCheck to 1 - this will cause all
validations to happen.
Good luck,
Alex @ Microsoft
> Ok, here is my problem with this:
>
[quoted text clipped - 35 lines]
>> >
>> > Thanks
Nick - 29 Jun 2005 16:05 GMT
Alex-
This will not work. As I had stated, the problem lies in the fact that
Yes/No happens BEFORE the save handler. I need to find a way to disable this
message, then use whatever code I need in the handler.
Thanks,
Nick
> Simply modify all your validation expressions to include another variable:
>
[quoted text clipped - 45 lines]
> >> >
> >> > Thanks
Alex [MSFT] - 30 Jun 2005 19:37 GMT
Create a button on the bottom of the form that allows the users to save the
form. This button will set doCheck = 1 and then look at
XDocument.Errors.Count. If it is = 0, it will call XDocument.Save().
Good luck.
Alex
> Alex-
>
[quoted text clipped - 61 lines]
>> >> >
>> >> > Thanks