Notes error with folders

I get the following error: “Notes error: All related response documents are being removed from this folder along with their parents. ((ExportForADP))”

The code that is causing this problem is in a Lotus Script agent.

Dim db As NotesDatabase

Dim dcToClear As NotesDocumentCollection

Set dcToClear = db.AllDocuments

Call dcToClear.RemoveAllFromFolder(“(ExportForADP)”)

The removeAllFromFolder is the line that causes the error when I walk through debug.

Code ran fine, when servers were 7.X. Since server was upgraded to 8.5, error has occurred. If I take a local copy on 8.5 machine - I get the same error. If I take a local copy on 7.x machine, codes runs flawlessly.

Option Declare is in the script.

Any ideas what might be causing the error?

Subject: FIXED…

Hopefully this will help someone else.The issue was that the (ExportForADP) folder had the property “Show response documents in a heirarchy” selected and it didn’t need to be selected. Once deselected, everything worked as expected.