Hi. I’m trying to include a confirmation message box with yes no on Remove Hold action button. If click yes then i want to change the status of the Remove hold. If click no then nothing should change. Here’s is my code.
public delegate IEnumerable ReleaseFromHoldDelegate(PXAdapter adapter);
PXOverride]
public IEnumerable ReleaseFromHold(PXAdapter adapter, ReleaseFromHoldDelegate baseMethod)
{
ARInvoice row = Base.Document.Current;
if(row.CustomerID != null &&
Base.Document.Ask("Are you sure you want to remove hold this?", MessageButtons.YesNo)
!= WebDialogResult.Yes) return adapter.Get();
return baseMethod(adapter);
}
When i click either yes or no in the confirmation box it gives me an error like this:
How can i solve this please ?