JAVA/CORBA CLASSES


Examples: getNthDocument method
This agent gets the first document in the last main category of a categorized view.

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();
     View view = db.getView("By Category");
     Document doc = view.getNthDocument(view.getTopLevelEntryCount());
     System.out.println(doc.getItemValueString("Subject"));
   } catch(Exception e) {
     e.printStackTrace();
   }
 }
}

See Also