import lotus.domino.*; public class JavaAgent extends AgentBase { public void NotesMain() { try { Session session = getSession(); AgentContext agentContext = session.getAgentContext(); // (Your code goes here) Agent agent = agentContext.getCurrentAgent(); Database db = agentContext.getCurrentDatabase(); if (agent.getComment() != null) { Form form = db.getForm(agent.getComment()); form.remove(); System.out.println (agent.getComment() + " removed from database"); } } catch(Exception e) { e.printStackTrace(); } } }
See Also