Solved

How to display confirmation dialog box ?

  • 22 June 2023
  • 3 replies
  • 215 views

Userlevel 1
Badge

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.

icon

Best answer by RohitRattan88 22 June 2023, 15:12

View original

3 replies

Userlevel 7
Badge +17

@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

Userlevel 1
Badge

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

        }

Userlevel 7
Badge +4

@Naveen Boga

protected void SOLine_RowUpdated(PXCache cache, PXRowUpdatedEventArgs e)

@Rajginoya I would try RowUpdating or FieldUpdating instead of Updated

Reply


About Acumatica ERP system
Acumatica Cloud ERP provides the best business management solution for transforming your company to thrive in the new digital economy. Built on a future-proof platform with open architecture for rapid integrations, scalability, and ease of use, Acumatica delivers unparalleled value to small and midmarket organizations. Connected Business. Delivered.
© 2008 — 2024  Acumatica, Inc. All rights reserved