Carysun. javaeye. the comblog463228 Advanced tab on the database attributes of Domino (Select File-database-attribute) and select allow soft Delete. In this way, the soft delete function is enabled, when a document is not deleted, we can use the GetDocumentByID (NoteID) and GetDocumentByUNID (U
Http://carysun.javaeye.com/blog/463228 In the Domino database Properties Advanced tab (Select File-database-properties), select allow soft Delete, So we enable the soft Delete feature, when a document is not deleted, we can use the GetDocumentByID (NoteID) and GetDocumentByUNID (U
Http://carysun.javaeye.com/blog/463228
In the "advanced" tab of the database attribute of Domino (Select File> database> attribute), select "allow soft Delete", so that the soft delete function is enabled, when a document is not deleted, you can use the GetDocumentByID (NoteID) and GetDocumentByUNID (UNID) Methods of NotesDatabase to obtain this document. If we delete this document, when GetDocumentByUNID is used to obtain this document, the following error is reported:
---------------------------
Invalid universal id (4091) at line 14
---------------------------
Of course, the same error is reported when you use GetDocumentByUNID to obtain hard-deleted and non-existent documents.
In this case, we can only use GetDocumentByUNID to obtain this document. We can use the IsDeleted attribute of NotesDocument to determine whether the document has been deleted.
After the soft deletion expires, the document will be deleted. At this time, the deleted stubs will still exist.
When the document's stubs are no longer available, the error 4270 will be reported when you use GetDocumentByID for access. The following is the test code:
Sub Initialize() On Error GoTo TrapError Dim CurrentDB As NotesDatabase Dim Doc As NotesDocument Dim InvalidNoteID As Integer Dim Session As New NotesSession CurrentDB = Session.CurrentDatabase InvalidNoteID = 0 'Set Doc = CurrentDB.GetDocumentByID ("15BB2" ) Doc = CurrentDB.GetDocumentByUNID("889D30CE3CEE82F2482575520009CB1E") If InvalidNoteID = 0 Then If Doc Is Nothing Then Msgbox("Deletion stub") ElseIf Doc.IsDeleted Then Msgbox("Soft deletion") Msgbox(doc.Subject(0)) Else Msgbox("Active message") Msgbox(doc.Subject(0)) End If Else Msgbox("No message") End If Exit SubTrapError: Select Case Err Case 4270 Msgbox("4270") InvalidNoteID = 1 Resume Next Case Else Msgbox Error + " (" + Cstr (Err) + " ) at line " + Cstr (Erl) End End SelectEnd Sub
Deleted documents can be restored before their soft deletion expires. Until the database view is refreshed (Click F9, select View> refresh, or close the database), the files marked with soft deletion will not appear in your waste paper basket.
To view or restore these deleted documents, you must create the following views in the database:
1. Start Domino Designer and open the database for soft Deletion
2. on the main menu, select "CREATE"-> "View"
3. Enter the view name in "view name" (you can give this view a name)
4. Select "share, include deleted documents" in "view type"
The above operation creates a document in the database for users to view all soft deletes. Now you can access the document marked as soft Delete.
@ UndeleteDocument
This command restores a document marked as a soft Delete to a normal state.