My.ADVISOR.com Sign-In
ID
Password

Member Center / Sign-Up
   
SUBSCRIPTION STATUS
If you are a subscriber to this publication, sign-in to access locked articles. To subscribe or renew go to www.AdvisorStore.com.
Go to Article

ADVISOR TIPS

Protect Lotus Design Via Code

LotusScript fuction to control design element protection checkbox.

By Mark Arteaga

I was creating shared folders in LotusScript using Doc.PutinFolder([FOLDERNAME],1).

This worked beautifully, but when a refresh of the template went through at night, the folders disappeared. This happened because the option "Prohibit design refresh or replace to modify" wasn't checked.

I hate doing things manually so I wrote the code below.

  • In the mail template or your mail database, look for the view ($FolderInfo). This shows all the folders in the database as documents.
  • The function gets a handle on the view name ($FolderInfo) and scrolls through all the documents in the view. Put the code in as a Library or whatever you prefer.
  • The field $Flags holds information on the folder. "Prohibit design refresh or replace to modify" is represented by "P". If the "P" is not there, add it and the checkbox will be on when viewed in Domino Designer.

Function ProhibitDesignChangesOnFolder(FolderName As Variant)
  Dim d As notesdatabase
  Dim s As New notessession
  Dim v As notesview
  Dim doc As notesdocument
  Dim t_fname As Variant
  Dim temp As Variant

  Set d = s.currentdatabase
  Set v = d.getview("($folderinfo)")

  Set doc = v.getfirstdocument

  While Not(doc Is Nothing)
    t_fname = doc.getitemvalue("$Name")
    If t_fname(0) = FolderName Then
      temp = doc.getitemvalue("$Flags")
      If Instr(1,temp(0),"P") = 0 Then
        'if it is not in the flags then add it to the end
        'P is for prohibit design changes
        Call doc.ReplaceItemValue("$Flags", temp(0) & "P")
        doc.save 1,0
        Exit Function
      End If
    End If
    Set doc = v.getnextdocument(Doc)
  Wend
End Function


Printer-friendly
page layout

Prohibit Lotus Notes/Domino Design Refresh or Replace

No reader comments ... yet.

    What do YOU think about this topic? Share your advice and thoughts using this form.

    Your Name

    REQUIRED : PUBLIC

    Your E-Mail

    REQUIRED : PRIVATE

    Job, Company

    OPTIONAL : PUBLIC

    City, State, Country

    OPTIONAL : PUBLIC

    Your Web Site

    OPTIONAL : PUBLIC

    Your Comment

    Please help everyone by keeping your comments on-topic, using clean language, and not defaming or making personal attacks.


    Your e-mail address is required, but it will not be displayed to the public or given to anyone. See our Privacy Policy. Comments become visible after they pass our spam filter, and spammers and abusers are permanently blocked. Please report spam or abuse.

    ARTICLE INFO

    Web Edition: 2000.06.21, Doc #06277

    FREE ACCESS FREE ACCESS

    Keyword Tags: Code, Development, E-Business, FileMaker, IBM Lotus, Lotus, Lotus Notes, Lotusscript, LotusScript, Microsoft, Microsoft SQL Server, Programming, Security, Web Development

    Use of this or any other site, content, product or service of Advisor Media constitutes acceptance of Terms of Use.
    Portions copyright ©1983-2010 Advisor Media, LLC. All Rights Reserved.
    Reuse or reproduction of any portion or quantity of Advisor Media's copyrighted content, in any form, for any purpose, requires written permission.
    ADVISOR®, the ADVISOR logo, and other names and logos that incorporate ADVISOR are registered trademarks, trademarks or service marks of Advisor Media, LLC in the United States and/or other countries.
    Other trademarks are used for identification, editorial or descriptive purposes and are the property of their owners.
    Hosted by Prominic.NET Website powered by
    LOTUS SOFTWARE
    oa ADVTP077 posted 2000-6-21 mod 03/17/2010 03:10:19 AM ztdbms/ztdbms
    domino-144.advisor.com my.advisor.com 03/19/2010 06:07:29 PM