Remove Lotus Notes design element inheritance programmatically

As part of the effort to create a rudimentary version control system, I would like to programmatically disable inheritance of the design element level on the Lotus Notes template. I have so far tried the following:

  • Export DXL (ForceNoteFormat = true) + XSLT. This failed with the check problem in the importer in the fields (!).
  • Export DXL (ForceNoteFormat = false) + XSLT. It seems to work, but I would rather not use the DXL solution for something so common.

Area I would like to study:

  • Complete all (design) Notes, remove the $Class element.

Does anyone have a suggestion on how to do this, or another approach that will remove inheritance?

+2
lotus-domino lotus-notes
source share
1 answer

The following subsection seems to work: it removes the flag from any design element that client 7.0.3 can produce. I found out about NotesNoteCollection from Ian's blog on the same issue:

 Private Sub clearDesignInheritance(db As notesdatabase) On Error Goto errorthrower Dim nc As NotesNoteCollection Set nc = db.CreateNoteCollection(True) ' Select all note types... nc.SelectDocuments=False ' ...except data documents. Call nc.BuildCollection Dim noteid As String noteid = nc.GetFirstNoteId Dim doc As notesdocument Do Until noteid="" Set doc = db.GetDocumentByID(noteid) If doc.HasItem("$Class") Then Call doc.RemoveItem("$Class") Call doc.save(False,False,False) End If noteid = nc.GetNextNoteId(noteid) Loop Exit Sub ErrorThrower: Error Err, Error & Chr(13) + "Module: " & Cstr( Getthreadinfo(1) ) & ", Line: " & Cstr( Erl ) End Sub 
+4
source share

All Articles