Link to home
Start Free TrialLog in
Avatar of JEtkins
JEtkins

asked on

Removing root document for a repeating appointment

Our CEO has managed to create a logical "should-not-occur" condition whereby his mail file contains the root document from a series of repeating appointments, without any actual instances of the appointment remaining.  When you open this document (which can only be located by its UNID), a popup appears which warns that "This document cannot be modified. It contains the original information for a repeating meeting from when the meeting was first created. If you wish to apply changes, select a specific occurence of the meeting."

Trouble is, all the occurences have been removed, and all attempts to delete this document are shrugged off and merely result in another entry in $Revisions.

He insists that it's causing him problems (though whether real or perceived I cannot say), so I really need to find a way to ged rid of this thing.  Any and all suggestions welcomed.
Avatar of HappyFunBall
HappyFunBall

The attempts to delete the document are probably stopped via the QueryDeleteDocument event in the Database Resources of the design.  If you add the line "Exit Sub" (without the quotes) as the first line in that event, that will bypass all the code that runs when a document is about to be deleted.  You should then be able to delete the document without getting any error messages.
Or delete the document using an agent :

dim doc as notesdocument
dim db as notesdatabase
dim s as new notessession
set db = s.currentdatabase
set doc = db.getdocumentbyunid( "ENTER UNID HERE" )
Call doc.remove(true)

cheers,

Tom
ASKER CERTIFIED SOLUTION
Avatar of Bozzie4
Bozzie4
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JEtkins

ASKER

Thanks for the suggestion Happy, but there was no code in that event.  Bozzie's code did the trick.

Thanks all!
I'm glad you got it fixed, but I must note that there's a ton of code in the QueryDocumentDelete event on the R6 mail template design.  Perhaps you're using a different version?  Just curious because I can't imagine you'd get the error message if there was no code in that event.
Avatar of JEtkins

ASKER

Hmm, you're right.  I could swear that when I looked in there earlier there was only a Sub and an End Sub statement with nothing in between!  I must be going senile.  Thanks anyway. :)