Skip to main content
Solved

How to display confirmation dialog box ?

  • June 22, 2023
  • 3 replies
  • 566 views
  • Translate All

Forum|alt.badge.img

If the quantity is 0 in any row, a confirmation dialog box will appear, if you click on OK, the value will change, if you click on cancel, the old value will be returned. It will be applied to the entire grid.

Best answer by RohitRattan88

@Naveen Boga

protected void SOLine_RowUpdated(PXCache cache, PXRowUpdatedEventArgs e)

@Rajginoya I would try RowUpdating or FieldUpdating instead of Updated

View original

3 replies

Naveen Boga
Captain II
Forum|alt.badge.img+20

@Rajginoya 

 

To invoke the dialog box from the code, you need to use the below code.

 Eg: ViewName.Ask()


Here is the article for your reference:

 https://asiablog.acumatica.com/2015/11/using-smart-panel.htmlsample

Translate

Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • June 22, 2023

@Naveen Boga

This form does not just show a confirmation dialog box that you want to save the value or not

  protected void SOLine_RowUpdated(PXCache cache, PXRowUpdatedEventArgs e)
        {

            SOLine row = (SOLine)e.Row;
            SOLine oldrow = (SOLine)e.OldRow;
            foreach (SOLine soLine in Base.Transactions.Select())
            {
                if (soLine.BaseQty == Convert.ToDecimal(0))
                {
                    if (Base.Transactions.Ask("Transactions", PhoneRepairShop.Messages.BaseQtycheckzero, MessageButtons.OKCancel) == WebDialogResult.Cancel)
                    {
                        Base.Transactions.Current = oldrow;
                        return;
                    }
                }
            }

        }

Translate

RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+5

@Naveen Boga

protected void SOLine_RowUpdated(PXCache cache, PXRowUpdatedEventArgs e)

@Rajginoya I would try RowUpdating or FieldUpdating instead of Updated

Translate