Search code examples
acumatica

Adding custom fields to Bills and Adjustment screen causes "nullable object must have a value"


I have a customization to the Bills and Adjustments screen (AP301000), where I'm simply adding 4 user fields to the Document Details tab's grid. I've done this many, many times in the past and I've never seen this error. I have absolutely NO idea what would cause it.

Here's the DAC extension:

[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

}

The database fields exist as follows:

enter image description here

Here is how the fields are added:

enter image description here

And here is the error:

enter image description here


Solution

  • We ran across the same issue. It is a bug in Acumatica. It is resolved in build 20.104.