更新环境数据的一种方式原创
204次浏览
编辑于2023年11月27日 14:25:56
1,扩展应用
2,扩展单据
3,注册表单插件-注册脚本
4,添加脚本
require("kd.bos.sdk.KEnv");require("kd.bos.servicehelper.operation.SaveServiceHelper");//添加引用/** * @author IERP* @date 2023-06-13 */var plugin = new FormPlugin({ afterBindData : function(e){ }, afterCreateNewData : function(e){ var aa="1706617309193317376"; var bd_auxproperty = BusinessDataServiceHelper.loadSingle(aa, "bd_auxproperty"); if(bd_auxproperty!=null) { this.getView().showMessage("222"); var flexVal="f000090"; bd_auxproperty.set("flexfield",flexVal); SaveServiceHelper.save([bd_auxproperty]); this.getView().showMessage(flexVal); } }, click : function(e){ this.getView().showMessage("testbtn"); if(e.getSource().getKey()=="testbtn") { } }, closedCallBack : function(e){ }, confirmCallBack : function(e){ }, itemClick : function(e){ }, registerListener : function(e){ this.addClickListeners("testbtn"); }, });