Issue:
Before save (a.k.a QuerySave), need to make sure that e-mail address field is unique (MailAddress) on a Contacts document.
Solution:
Code attached, validates that the e-mail address is is no other document but the current one. Add the code snippets to the form: add any functions to the global events, add the e-mail address validation code itself to the QuerySave form event. Note that the session (s), application (db), current document (uiDoc and doc), are all assumed global declarations and initialized in the QueryOpen.
VerifyEmailForDuplicates.txt
previous page
|