Skip to main content
Answer

How to display confirmation dialog box ?

  • June 22, 2023
  • 3 replies
  • 489 views

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

3 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • June 22, 2023

@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


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;
                    }
                }
            }

        }


RohitRattan88
Acumatica Moderator
Forum|alt.badge.img+4
  • Acumatica Moderator
  • Answer
  • June 22, 2023

@Naveen Boga

protected void SOLine_RowUpdated(PXCache cache, PXRowUpdatedEventArgs e)

@Rajginoya I would try RowUpdating or FieldUpdating instead of Updated