.

HCLSoftware Business Partner
Domino Consulting Services
CRUCIAL Notes Tools
+1 212-599-2048

Domino Consulting Services
CRUCIAL Notes Tools
Domino administration
Notes development

Facebook Twitter YouTube
Chat now       
.
ProductsDownloadsNewsAbout usContact


Need a Domino Consultant? Call NotesMail +1 212-599-2048 - HCLSoftware Business Partner

JAVA/CORBA CLASSES


Examples: IsHidden, IsHiddenFromNotes, IsHiddenFromWeb, HideFormula, UseHideFormula, and KeepSelectionFocus properties
This agent sets a hide formula for all the entries in an outline and does not keep selection focus. The setHidden method, which is commented out, has the same effect as setHiddenFromNotes plus setHiddenFromWeb.

import lotus.domino.*;
public class JavaAgent extends AgentBase {

 public void NotesMain() {

   try {
     Session session = getSession();
     AgentContext agentContext = session.getAgentContext();

     // (Your code goes here)
     Database db = agentContext.getCurrentDatabase();
     Outline outline = db.getOutline("DiscOutline");
     OutlineEntry tmpentry;
     OutlineEntry entry = outline.getFirst();
     while (entry != null) {
       System.out.println(entry.getAlias());
       //entry.setHidden(false);
       entry.setHiddenFromNotes(false);
       entry.setHiddenFromWeb(false);
       entry.setUseHideFormula(true);
       entry.setHideFormula("@UserName = \"Snoopy\"");
       entry.setKeepSelectionFocus(false);
       outline.save();
       tmpentry = outline.getNext(entry);
       entry.recycle();
       entry = tmpentry;
     }

   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also