I have a repeat control with buttons to select or deselect various docs - that works and I can identify each selected doc by the doc id. I have another button with the following SSJS. For the docs selected I want to set a field in the underlying doc. This script works if I do a simple doc.removePermanently(true)... but not if I try to manipulate a common field value for the selected docs. I'm getting an Error 500 HTTP Web Server: Command Not Handled Exception. What is the proper way to do this?
var docsForAction = sessionScope.get("myList");
var doc:NotesDocument;
for(i=0; i < docsForAction.length; i++){
doc = database.getDocumentByUNID(docsForAction[i]);
doc.setValue("Level","10");
}
docsForAction = [];
viewScope.put("myList", docsForAction);
context.reloadPage();
doc.replaceItemValue("fld", "val")
instead ofdoc.setValue()
. Don't think that method exists on a NotesDocument. – Mark Leusink