获取基础资料列表的数据

问题描述

列表点击按钮时,获取所有列信息
原因分析
这时候通过代码获取选中行信息,只能获取到模板预置的字段:id,单据体id,编码,名称,数据状态;想要获取列表更多列,需要通过QueryServiceHelper或BusinessDataServiceHelper进一步查询获取
BillList billList = this.getControl(AbstractListPlugin.BILLLISTID); ListSelectedRowCollection selectedRows = billList.getSelectedRows();

解决方案
在插件中通过QueryServiceHelper或BusinessDataServiceHelper获取列表完整信息
BillList billList = this.getControl(AbstractListPlugin.BILLLISTID);
//获取选中行信息,只能拿到id,number,name,enable,status信息;要获取其他列信息,需要通过QueryServiceHelper或BusinessDataServiceHelper查询
ListSelectedRowCollection selectedRows = billList.getSelectedRows();
//获取选中行pkid
Object[] primaryKeyValues = selectedRows.getPrimaryKeyValues();
StringBuffer str = new StringBuffer();
for (Object primaryKeyValue : primaryKeyValues) {
//获取基础资料列表信息
QFilter qFilter = new QFilter("id", QCP.equals,primaryKeyValues);
String selectFields = "id,number,name,enable,status,kdec_basedatafield1.name,kdec_entryentity.kdec_basedatafield.name,kdec_entryentity.kdec_mulbasedatafield.fbasedataid.name";
DynamicObjectCollection query = QueryServiceHelper.query(billList.getBillFormId(),selectFields,new QFilter[]{qFilter});
//DynamicObject dynamicObject1 = BusinessDataServiceHelper.loadSingle(primaryKeyValue, billList.getBillFor获取基础资料列表的数据
问题描述列表点击按钮时,获取所有列信息原因分析这时候通过代码获取选中行信息,只能获取到模板预置的字段:id,单据体id,编码,名称,数...
点击下载文档文档为doc格式
声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。
上一篇
已经是第一篇



