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 ?
![](https://uploads-us-west-2.insided.com/acumatica-en/attachment/874df7e4-f849-45ba-b124-c0fbffd38f2f.png)
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
}
}