I am receiving an error when trying to call an agent from an xpages button click: Error below
Error while executing JavaScript action expression Script interpreter error, line=2, col=7: [TypeError] Exception occurred calling method NotesAgent.runWithDocumentContext(lotus.domino.local.Document) null
JavaScript code
var agent=database.getAgent("xpCreateNewCopy");
agent.runWithDocumentContext(currentDocument.getDocument());
agent
andcurrentDocument.getDocument()
both have value (are not null)? If I recall correctly I once noticed the same,runWithDocumentContext
did not work from SSJS (don't remember the Domino version). – Panu Haaramo