JAVA/CORBA CLASSES
import lotus.domino.*; import java.util.Vector; import lotus.domino.*; 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(); DocumentCollection dc = db.getAllDocuments(); Document doc = dc.getFirstDocument(); if (doc != null) { Document newdoc = db.createDocument(); Item item = doc.getFirstItem("Subject"); item.copyItemToDocument(newdoc); item = doc.getFirstItem("Body"); item.copyItemToDocument(newdoc, "BodyPrototype"); newdoc.save(true, true); } } catch(Exception e) { e.printStackTrace(); } } }
See Also