@kevinheng21Â Could you please share the customization package here? If you can, it would greatly assist us in reviewing it from our end
Is there any chance you changed the files in App_RuntimeCode and refreshed without publishing?
@kevinheng21Â Also, I request you to check this LINKÂ and may be helpful to you, if not please share the customization package as requested above.
I found the code that make it error. But I can fix it yet. Please advice meÂ
    PXUIField(DisplayName = "Reports", MapEnableRights = PXCacheRights.Select)]
    ÂPXButton(CommitChanges = true)]
    protected virtual IEnumerable Report(PXAdapter adapter) => adapter.Get();
    pPXButton(CommitChanges = true)]
    ePXUIField(DisplayName = "Print Payment Order")]
    protected void PaymentOrderform()
    {
      PaymentOrderHeader current = this.PaymentOrderHeaders.Current;
      throw new PXReportRequiredException(new Dictionary<string, string>()
      {
        <"RefNbr"] = current.RefNbr
      }, "PO109101", "Report");
    }
@kevinheng21Â It seems like we need to handle the NULL exceptions. Can you please try with the below code. If still it is not working, please share the customization project here.
Â
PXUIField(DisplayName = "Reports", MapEnableRights = PXCacheRights.Select)]
PXButton(CommitChanges = true)]
protected virtual IEnumerable Report(PXAdapter adapter) => adapter.Get();
PXButton(CommitChanges = true)]
PXUIField(DisplayName = "Print Payment Order")]
protected void PaymentOrderform()
{
if(this.PaymentOrderHeaders.Current !=null)
{
PaymentOrderHeader current = this.PaymentOrderHeaders.Current;
throw new PXReportRequiredException(new Dictionary<string, string>()
{
"RefNbr"] = current?.RefNbr
}, "PO109101", "Report");
}
}
Â