Duplicate E-mail Check for Contacts App

Mindwatering Incorporated

Author: Tripp W Black

Created: 01/26/2013 at 12:49 AM

 

Category:
Notes Developer Tips
LotusScript

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.txtVerifyEmailForDuplicates.txt



previous page