0

I have a performance issue in my dataview and I want to retrieve specific fields from my custom data view called "AplicacionInventoryItem" in SOOrderEntry_Extension, I use this data view in the DataMember property to obtain data records into the grid.

See the screenshot below: enter image description here

This is the data view, :

public PXSelectJoin<
        InventoryItem,
        LeftJoin<InventoryItemAplication,
            On<InventoryItemAplication.inventoryID, Equal<InventoryItem.inventoryID>>,
        LeftJoin<Aplicacion,
            On<Aplicacion.aplicacionID, Equal<InventoryItemAplication.aplicacionID>>,
        LeftJoin<INItemXRef,
            On<INItemXRef.inventoryID, Equal<InventoryItem.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>, IsNull,
                    Or<Aplicacion.segmento, Equal<Current<AplicacionInventoryItemFilter.segmento>>>>,
            And2<
                Where<Current<AplicacionInventoryItemFilter.marca>, IsNull,
                    Or<Aplicacion.marca, Equal<Current<AplicacionInventoryItemFilter.marca>>>>,
            And2<
                Where<Current<AplicacionInventoryItemFilter.modelo>, IsNull,
                    Or<Aplicacion.modelo, Equal<Current<AplicacionInventoryItemFilter.modelo>>>>,
            And2<
                Where<Current<AplicacionInventoryItemFilter.motor>, IsNull,
                    Or<Aplicacion.motor, Equal<Current<AplicacionInventoryItemFilter.motor>>>>,
            And2<
                Where<Current<AplicacionInventoryItemFilter.usrCombustible>, IsNull,
                    Or<Aplicacion.usrCombustible, Equal<Current<AplicacionInventoryItemFilter.usrCombustible>>>>,
            And2<
                Where<Current<AplicacionInventoryItemFilter.itemClassID>, IsNull,
                    Or<InventoryItem.itemClassID, Equal<Current<AplicacionInventoryItemFilter.itemClassID>>>>,
            And2<
                Where<Current<AplicacionInventoryItemFilter.alternateID>, IsNull,
                    Or<INItemXRef.alternateID, Equal<Current<AplicacionInventoryItemFilter.alternateID>>>>,
            And2<
                Where<Current<AplicacionInventoryItemFilter.descr>, IsNull,
                    Or<InventoryItem.descr, Like<Current<AplicacionInventoryItemFilter.searchDescrWildcard>>>>,
            And<
                Where<Current<AplicacionInventoryItemFilter.subItem>, IsNull,
                Or<INSubItemSegmentValue.value, Equal<Current<AplicacionInventoryItemFilter.subItem>>>>>>>>>>>>>>,
        OrderBy<Asc<InventoryItem.inventoryCD>>> AplicacionInventoryItem;

How can I do this?

1 Answers1

0

Try to define a simple view like

public PXSelect<InventoryItem> AplicacionInventoryItem;

Then create a view delegate and inside view delegate use FieldScope. Please see this article https://asiablog.acumatica.com/2016/06/restricting-list-of-fields-selected.html