. Invoice To Cancel Invoice Action to show this error How To slove this error ?
public delegate void PersistDelegate();
[PXOverride]
public void Persist(Action del)
{
if (Base.Document.Cache.GetStatus((object)Base.Document.Current) == PXEntryStatus.Inserted)
{
if (Base.Document.Current != null)
{
ARTran objARTran = Base.Transactions.Select().FirstTableItems.ToList().FirstOrDefault();
if (objARTran != null)
{
SOOrder objSOOrder = SOOrder.PK.Find(Base, objARTran.SOOrderType, objARTran.SOOrderNbr);
if (objSOOrder != null)
{
SOOrderExt soOrderExt = objSOOrder.GetExtension<SOOrderExt>();
ARInvoiceExt invoiceExt = Base.Document.Current.GetExtension<ARInvoiceExt>();
invoiceExt.UsrCommentQuote = soOrderExt.UsrCommentQuote;
invoiceExt.UsrIntComment = soOrderExt.UsrIntComment;
invoiceExt.UsrPOComment = soOrderExt.UsrPOComment;
}
}
}
}
del();
}