Hi i cannot work out what i am missing. I want a warning not a stop message when an AP Bill is created/updated if the Total value is 0. It works but i cannot save the Bill with a zero as the error keeps presenting on save. I have tried Row Inserted but that triggers to early.
public class APInvoiceEntry_Extension : PXGraphExtension<PX.Objects.AP.APInvoiceEntry>
{
#region Event Handlers
protected void APInvoice_RowPersisted(PXCache cache, PXRowPersistedEventArgs e, PXRowPersisted InvokeBaseHandler)
{
if(InvokeBaseHandler != null)
InvokeBaseHandler(cache, e);
var row = (APInvoice)e.Row;
if (row !=null && row.CuryLineTotal == 0)
{
throw new PXSetPropertyException("The document total is zero", PXErrorLevel.Warning);
}
}