Error: Deleting Docs Using dc.Remove

Greetings All,

I have an issue with deleting documents using the dc.RemoveAll(True) method of the NotesDocumentCollection.

More specifically, I have written some code that checks if the document if is New or not; if so, then it creates the document; if the document is NOT new, then it removes all previous documents and recreates them based on values listed within the table.

Whenever I run this from my machine using R6.5.3, I have no issues…everything processes as it is supposed to. However when a collegue runs it, she gets an error - “Notes Error:You cannot update or delete the document(s) since you are not listed as an allowable Author for this document.”

I have tried the following thus far, none with any success:

(1) Gave the user (who was currently an Editor) priviledges to delete documents by selecting that option within the ACL;

(2) I created an Authors field to compute when compose that contains the user’s name, as well a specified role…and verified her name in the field;

(3) Increased her database access, thus making her a Manager with delete priviledges.

Nothing worked!!! The thing to note here is that this particular user is using R5.0.12 and the database is an R6 database. Despite this, there are no other issues, everthing else is functioning as designed in addition the command itself is straightforward, not mention that I can get it to work from other locations.

      • SAMPLE CODE - - -

Sub UpdateDocs(db as NotesDatabase, doc as NotesDocument)

Dim view as NotesView

Dim dc as NotesDocumentCollection

Set view = db.GetView(“VIEWNAME”)

Set dc = view.GetAllDocumentsByKey(lkupHandle)

If dc.Count > 0 then

call dc.RemoveAll(True)

Call CreateNewDocs(db, doc)

else

Call CreateNewDocs(db, doc)

End If

End Sub

The issue is that I have two forms (using parent child relationshp); through the first, I am allowing users to enter date values (using a dynamic table approach).

These values are then stored into a dynamic table and via the QuerySave Event, I have created the appropriate children documents.