【发布时间】:2015-01-31 10:25:13
【问题描述】:
我不明白为什么我使用以下代码收到上述错误:
value1 = sessionScope.get("selectedPicture");
if (value1 != "empty"){
var db:NotesDatabase = session.getDatabase(database.getServer(), "product\\picture.nsf");
if (db != null) {
var IDtoChange = toString("7D59468E241AC271C1257D5000417E46") ;
if (IDtoChange = null){
return
}
try {
doc = db.getDocumentByUNID(IDtoChange);
doc.replaceItemValue( 'picWeb', "true" );
doc.save( true, false );
sessionScope.put("selectedUnid","");
} catch(e) {
sessionScope.put("error",(e.toString()));
context.redirectToPage("errorPage.xsp");
}
}
}
当我替换行 doc = db.getDocumentByUNID(IDtoChange); with doc = db.getDocumentByUNID("7D59468E241AC271C1257D5000417E46");一切正常
怎么了? (在我的真实代码中,id 当然不是硬编码的)
【问题讨论】:
标签: xpages xpages-ssjs