Hello, on Purchase Receipt Release action, we need to show user a Confirmation Dialog, then based on the input from first Confirmation Dialog, we need to show another Confirmation Dialog popup. On release action first Confirmation Dialog appears but not the second one. Please have a look at below code and suggest me what wrong am doing here.
public virtual IEnumerable Release(PXAdapter adapter)
{
if (Base.Document.Ask("Confirmation Dialog 1", MessageButtons.YesNo)
!= WebDialogResult.Yes) return adapter.Get();
else
if (Base.Document.Ask("Confirmation Dialog2", MessageButtons.YesNo)
!= WebDialogResult.Yes) return adapter.Get();
}