NotesOutline - how can I set the ‘Prohibit design refresh or replace…’ property using Lotus Script. Is there a way to do that programmatically? NoteView class has IsProhibitDesignRefresh property that I can simply set to ‘True’. Are there any (hidden) APIs available for NotesOutline? Any help truly appreciated.
Subject: RE: NotesOutline - how can I set the ‘Prohibit design refresh or replace…’ using LS
I haven’t tested it, but something like this should work:
Sub SetProhibitRefreshOutline(db As NotesDatabase, Byval outlineName$, Byval prohibit As Boolean)
Dim nnc As NotesNoteCollection
Set nnc = db.CreateNoteCollection(False)
nnc.SelectOutlines = True
nnc.SelectionFormula = {@lowercase($TITLE) = "} & Lcase(outlineName) & {"}
nnc.BuildCollection
If nnc.Count <> 1 Then
Error 31203, "Outline name " & outlineName & " matched " & nnc.Count & " outlines."
Else
Dim doc As NotesDocument
Dim strID$, flags$
Dim protected As Boolean
strID = nnc.GetFirstNoteId
Set doc = db.GetDocumentByID(strID)
flags = doc.GetItemValue("$Flags")(0)
protected = (Instr(flags, "P") > 0)
If prohibit <> protected Then
If prohibit Then
flags = flags & "P"
Else
flags = Replace(flags, "P", "")
End If
doc.ReplaceItemValue "$Flags", flags
doc.Save True, False, True
End If
End If
End Sub
Subject: RE: NotesOutline - how can I set the ‘Prohibit design refresh or replace…’ using LS
Andre,
Your solution worked like a charm. Thank you for your help!!!
Best Regards