在 "票据和调整 "页面添加自定义字段会导致 "可空对象必须有一个值"。

问题描述 投票:0回答:1

我对 "票据和调整 "屏幕(AP301000)进行了定制,我只是在 "文档详情 "选项卡的网格中添加了4个用户字段。 我过去已经做了很多很多次,但我从来没有看到过这个错误. 我完全不知道是什么原因造成的。

这里是DAC扩展。

[PXCacheName("AP Tran Extension")]
public class APTranExt : PXCacheExtension<APTran>
{

    #region UsrACAllocModule
    [PXDBString(30, IsUnicode = true, InputMask = "")]
    [PXUIField(DisplayName = "Allocation Module")]
    public virtual string UsrACAllocModule { get; set; }
    public abstract class usrACAllocModule : PX.Data.BQL.BqlString.Field<usrACAllocModule> { }
    #endregion

    #region UsrACAllocBatch
    [PXDBString(30, IsUnicode = true, InputMask = "")]
    [PXUIField(DisplayName = "Allocation Batch")]
    public virtual string UsrACAllocBatch { get; set; }
    public abstract class usrACAllocBatch : PX.Data.BQL.BqlString.Field<usrACAllocBatch> { }
    #endregion

    #region UsrACAllocLineNbr
    [PXDBInt()]
    [PXUIField(DisplayName = "Allocation LineNbr")]
    public virtual int? UsrACAllocLineNbr { get; set; }
    public abstract class usrACAllocLineNbr : PX.Data.BQL.BqlInt.Field<usrACAllocLineNbr> { }
    #endregion

    #region UsrACAllocationID
    [PXDBString(30, IsUnicode = true, InputMask = "")]
    [PXUIField(DisplayName = "Allocation ID")]
    public virtual string UsrACAllocationID { get; set; }
    public abstract class usrACAllocationID : PX.Data.BQL.BqlString.Field<usrACAllocationID> { }
    #endregion

}

数据库的字段如下

enter image description here

这里是如何添加字段的。

enter image description here

这里是错误信息

enter image description here

acumatica
1个回答
2
投票

我们遇到了同样的问题。这是Acumatica的一个错误。它在构建20.104中得到了解决。

© www.soinside.com 2019 - 2024. All rights reserved.