更新当前文档的字段值
(建议如果更新其他文档字段使用上面的update)
//第一种:
var doc=getCurrentDocument();//获取当前文档对象
//var process = new Packages.cn.myapps.core.
//dynaform.document.ejb.DocumentProcessBean(getApplication());
var docProcess = getDocumentProcess(); //同上面的啦
var userName = getWebUser().getName();
var userId =getWebUser().getName();
doc.findItem("开票人").setValue(userId);
doc.findItem("开票人姓名").setValue(userName);
process.doUpdate(doc);
//第二种(建议使用该方法)
var doc=getCurrentDocument();//获取当前文档对象
doc.addDateItem("签回日期", getToday());
doc.addStringItem("string类型","看看");
doc.addDoubleItem("数值字段",9939294194);
文档更新时间: 2023-09-16 04:15 作者:admin