Hi I am new in using lotus notes 9 , i created a form with some fields and a save button that is calling a java agent ! my problek is when i excute the form and click the button i get an error saying that the document is not saved. this is the agent code. thank you
import lotus.domino.AgentBase;
import lotus.domino.AgentContext;
import lotus.domino.Database;
import lotus.domino.Document;
import lotus.domino.Session;
public class JavaAgent extends AgentBase {
public void NotesMain() {
try {
Session session = getSession();
AgentContext agentContext = session.getAgentContext();
// (Your code goes here)
Database db = agentContext.getCurrentDatabase();
Document doc = agentContext.getDocumentContext();
doc = db.createDocument();
doc.save();
} catch (Exception e) {
e.printStackTrace();
}
}
}