Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 166
  • Last Modified:

Deleting a Document ends up corrupting the View


I have a view which lists all the documents and the responses in a hierarchical format. The selection formula I use is
SELECT (form = "My Plan" )  | @AllDescendants

I can create documents and adds responses correctly and they show up in the view as expected.
I can even go ahead and delete responses and the view gets updated accordingly.
However, If I delete a document, I get a Notes prompt "Document Deleted" and I exit and re-enter the database and try to open the view, it displays another unrelated view (View B).

In the designer mode, I can see all the views correctly, but If I try to preview it in notes.. It displays the unrelated View (View B.

I am really confused. I then have to recreate the lost view from scratch, but I can reproduce it every single time. And I am not sure what the problem is and more importantly how to solve it.

I imagine it has something to do with document-responses relationship..but I am not exactly sure what or why or how?

Gurus, any help here would be greatly appreciated.


1 Solution
First thing, Disable the "Allow Soft Deletions" database property.

Second, rebuild the view indexes by running UPDALL (database) -R or by holding down Shift-Ctrl-F9 from a Notes client.

This should fix the problem

arask2Author Commented:
The view corruption was traced down to a  particular agent in the database..

1, The agent would innocuously access the view. However, the agent did not have a clause to check whether the view contains any documents.  It would retrieve the NotesDocumentCollection and try to access the first document. This approach was OK as long as the view was not empty. However, if the view as empty, it ended up corrupting the view.  And since the agent had been executed a few times before, I presume, it ended up corrupting the database beyound redemption.

2, I made the necessary changes and rebuilt the database by deleting the corrupted copy and importing the new design. And that seems to have done the trick.

3, However, just to be on the safe side, I have disabled the allow soft deletions. I am not sure, if this would help or harm. I guess, I will  find out.. :)

Thanks for your prompt reply.. appreciate it


Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now