微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

如何从自定义数据视图中检索特定字段?

如何解决如何从自定义数据视图中检索特定字段?

我的数据视图中存在性能问题,我想从我的自定义数据视图(SOOrderEntry_Extension中称为“ AplicacionInventoryItem”)中检索特定字段,我在DataMember属性中使用此数据视图将数据记录获取到网格中。

请参见以下屏幕截图:

enter image description here

这是数据视图:

public PXSelectJoin<
        InventoryItem,LeftJoin<InventoryItemAplication,On<InventoryItemAplication.inventoryID,Equal<InventoryItem.inventoryID>>,LeftJoin<Aplicacion,On<Aplicacion.aplicacionID,Equal<InventoryItemAplication.aplicacionID>>,LeftJoin<INItemXRef,On<INItemXRef.inventoryID,LeftJoin<INSubItemSegmentValue,On<INSubItemSegmentValue.inventoryID,Equal<InventoryItem.inventoryID>>>>>>,Where2<
            Where<Current<AplicacionInventoryItemFilter.anoInicial>,IsNull,Or<Aplicacion.anoInicial,LessEqual<Current<AplicacionInventoryItemFilter.anoInicial>>,And<Aplicacion.anoFinal,GreaterEqual<Current<AplicacionInventoryItemFilter.anoInicial>>>>>,And2<
                Where<Current<AplicacionInventoryItemFilter.segmento>,Or<Aplicacion.segmento,Equal<Current<AplicacionInventoryItemFilter.segmento>>>>,And2<
                Where<Current<AplicacionInventoryItemFilter.marca>,Or<Aplicacion.marca,Equal<Current<AplicacionInventoryItemFilter.marca>>>>,And2<
                Where<Current<AplicacionInventoryItemFilter.modelo>,Or<Aplicacion.modelo,Equal<Current<AplicacionInventoryItemFilter.modelo>>>>,And2<
                Where<Current<AplicacionInventoryItemFilter.motor>,Or<Aplicacion.motor,Equal<Current<AplicacionInventoryItemFilter.motor>>>>,And2<
                Where<Current<AplicacionInventoryItemFilter.usrCombustible>,Or<Aplicacion.usrCombustible,Equal<Current<AplicacionInventoryItemFilter.usrCombustible>>>>,And2<
                Where<Current<AplicacionInventoryItemFilter.itemClassID>,Or<InventoryItem.itemClassID,Equal<Current<AplicacionInventoryItemFilter.itemClassID>>>>,And2<
                Where<Current<AplicacionInventoryItemFilter.alternateID>,Or<INItemXRef.alternateID,Equal<Current<AplicacionInventoryItemFilter.alternateID>>>>,And2<
                Where<Current<AplicacionInventoryItemFilter.descr>,Or<InventoryItem.descr,Like<Current<AplicacionInventoryItemFilter.searchDescrWildcard>>>>,And<
                Where<Current<AplicacionInventoryItemFilter.subItem>,Or<INSubItemSegmentValue.value,Equal<Current<AplicacionInventoryItemFilter.subItem>>>>>>>>>>>>>>,OrderBy<Asc<InventoryItem.inventoryCD>>> AplicacionInventoryItem;

我该怎么做?

解决方法

尝试定义一个简单的视图,例如

public PXSelect<InventoryItem> AplicacionInventoryItem;

然后创建一个视图委托 并且内部视图委托使用FieldScope。 请看这篇文章 https://asiablog.acumatica.com/2016/06/restricting-list-of-fields-selected.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。