I thought this would be easy:
function assignToMeAgent() {
if (null != viewScope.get("rowId")) {
var _db: NotesDatabase = session.getDatabase(datasources["server"], datasources["database"]);
var doc: NotesDocument = _db.getDocumentByUNID(viewScope.get("rowId"));
if (null != doc) {
var agent: NotesAgent = _db.getAgent("ABC");
if (agent != null) {
agent.runWithDocumentContext(doc);
}
}
}
}
However I can an error at line:
agent.runWithDocumentContext(doc);
If I include print statements I see that the document is found in the database and that the agent is found.
The error message I get is as followed:
[0B5C:000D-127C] 2018-01-22 12:36:48 HTTP JVM: CLFAD0131E: Unable to push data because: Error while executing JavaScript computed expression. For more detailed information, please consult error-log-0.xml located in E:/IBM/Domino/data/domino/workspace/log [0B5C:000D-127C] 2018-01-22 12:39:36 HTTP JVM: com.ibm.xsp.webapp.FacesServlet$ExtendedServletException: com.ibm.xsp.FacesExceptionEx: com.ibm.xsp.exception.EvaluationExceptionEx: Error while executing JavaScript computed expression