所选列不会显示在网格

时间:2018-04-06 18:16:10

标签: acumatica

我有一个基于PXProjection of SOShipment的处理屏幕。我想将所选列从SOShipment传送到网格以进行单独的行处理。无论我做什么,我都无法展示它。在表单设计中,Selected显示为不可见字段。另外,另一个奇怪的事情是,如果我单击网格左上角的列配置,则不显示Selected。如果单击“返回到默认值”并将其移至顶部,则“选定”列将显示在网格上。页面重新加载会导致它消失。请参阅下面的投影定义:

using PX.Data;
using PX.Objects.SO;
using System;
namespace EDIASNs
{

[Serializable]
[PXProjection(typeof(Select2<SOShipment,
    LeftJoin<SOOrderShipment, On<SOShipment.shipmentNbr, Equal<SOOrderShipment.shipmentNbr>>,
    LeftJoin<SOOrder, On<SOOrder.orderNbr, Equal<SOOrderShipment.orderNbr>>>>>),
    Persistent = true)]

public partial class EDASNShipProj : SOShipment
{
    #region OrderNbr
    [PXDBString(15, IsKey = true, BqlField = typeof(SOOrder.orderNbr), IsUnicode = true, InputMask = ">CCCCCCCCCCCCCCC")]
    [PXDefault()]
    [PXUIField(DisplayName = "Order Nbr")]
    public virtual string OrderNbr { get; set; }
    public abstract class orderNbr : IBqlField { }
    #endregion

    #region OrderCustomerRefNbr
    [PXDBString(40, IsUnicode = true, BqlField = typeof(SOOrder.customerRefNbr))]
    [PXUIField(DisplayName = "Order Document Id")]
    public virtual String OrderCustomerRefNbr { get; set; }
    public abstract class orderCustomerRefNbr : PX.Data.IBqlField { }
    #endregion

    #region OrderCustomerOrderNbr
    [PXDBString(40, IsUnicode = true, BqlField = typeof(SOOrder.customerOrderNbr))]
    [PXUIField(DisplayName = "Customer Order")]
    public virtual String OrderCustomerOrderNbr { get; set; }
    public abstract class orderCustomerOrderNbr : PX.Data.IBqlField { }
    #endregion

    #region UsrTruckNbr
    [PXDBInt(BqlField = typeof(SOShipmentExt.usrTruckNbr))]
    [PXDefault(0, PersistingCheck = PXPersistingCheck.Nothing)]
    [PXUIField(DisplayName = "Truck Nbr")]
    public virtual int? UsrTruckNbr { get; set; }
    public abstract class usrTruckNbr : IBqlField { }
    #endregion
}

以下是图表中的选择:

    public class EDASNCreateProcess : PXGraph<EDASNCreateProcess>
{
    public PXCancel<EDCreateASNFilter> Cancel;
    public PXFilter<EDCreateASNFilter> Filter;

    [PXFilterable]
    public PXFilteredProcessing<EDASNShipProj, EDCreateASNFilter,
        Where2<Where2<Where2<Where2<Where2<Where2<Where2<
                Where<Current<EDCreateASNFilter.customerID>, IsNull, 
                    Or<EDASNShipProj.customerID, Equal<Current<EDCreateASNFilter.customerID>>>>,
            And<Where<Current<EDCreateASNFilter.startDate>, IsNull, 
                    Or<SOShipment.shipDate, GreaterEqual<Current<EDCreateASNFilter.startDate>>>>>>,
            And<Where<SOShipment.shipDate, LessEqual<Current<EDCreateASNFilter.endDate>>>>>,
            And<Where<Current<EDCreateASNFilter.shipVia>, IsNull, 
                    Or<SOShipment.shipVia, Equal<Current<EDCreateASNFilter.shipVia>>>>>>,
            And<Where<Current<EDCreateASNFilter.truckNbr>, IsNull, 
                    Or<SOShipmentExt.usrTruckNbr, Equal<Current<EDCreateASNFilter.truckNbr>>>>>>,
            And<Where<SOShipment.status, Equal<SOShipmentStatus.open>>>>,
            And<Where<SOShipmentExt.usrEDIStatus, Equal<SOShipmentEDIStatus.truckAssigned>, 
                    Or<SOShipmentExt.usrEDIStatus, Equal<SOShipmentEDIStatus.newStat>>>>>,
            And<Where<EDASNShipProj.orderCustomerRefNbr, IsNotNull>>>,
        OrderBy<Asc<SOShipment.customerID, 
                Asc<SOOrderExt.usrEDICustomerId, 
                Asc<SOOrderExt.usrEDICustomerVendorId, 
                Asc<SOShipment.shipVia,
                Asc<SOShipmentExt.usrTruckNbr, 
                Asc<SOShipment.customerLocationID>>>>>>>> Shipment;

网格的数据库是Shipment。

我还尝试在投影上创建一个新的Selected属性,并将其设置为覆盖,但没有成功。如何从SOShipment获取Selected列?

1 个答案:

答案 0 :(得分:0)

我认为Project DAC声明是错误的。 public partial class EDASNShipProj : SOShipment。投影DAC被声明为继承自SOShipment

应该是这样,对于选定字段,还需要添加投影DAC。请找到屏幕截图以供参考。 public class EDASNShipProj : IBqlTable

enter image description here