I'm looking for a method that can prevent a document from being deleted under certain circumstances. I have a database that keeps track of employee benefits & Insurance plans. I don't want to allow deletions of a plan if it is currently selected on an employee document. I'm running Notes 4.6.1.
How can I trap the deletion from both the Views & the Form? I know I can trap it in the Queryclose event of the form, but how about the view. Also, is there a way to tell if the document is being deleted? (I can't find an @IsDocBeingDeleted function or Object property). Ideally, I check this property, then see if there are any employee records that reference the current document &, if found, set Continue = False to prevent the deletion.