I have included a confirmation message when click on save. If user click yes it proceeds to save. If click no i get this error. I just to to avoid save if click no but instead i get this. Why is that ?
My code:
public void ARInvoice_RowPersisting(PXCache cache, PXRowPersistingEventArgs e, PXRowPersisting baseHandler)
{
if (baseHandler!= null)
baseHandler(cache, e);
WebDialogResult result = Base.Document.Ask("Confirmation", "Do you want to save?", MessageButtons.YesNo);
if (result == WebDialogResult.No)
{
e.Cancel = true; // User clicked "No" in the confirmation dialog, cancel the save operation
}
}