Solved

Show Error/Warning Message

  • 2 October 2023
  • 2 replies
  • 197 views

Userlevel 3
Badge

Hi Team,

Can someone tell me how to show Error/Warning message box?

Here is my code

protected void HMRCAPIConfigDetail_Active_FieldUpdated(PXCache cache, PXFieldUpdatedEventArgs e)
        {

            var row = (HMRCAPIConfigDetail)e.Row;
            var activeAPIConfigs = ActiveAPIConfigs;
            if(activeAPIConfigs != null)
            {
                row.Active = false;
                throw new PXException(Messages.APIActiveErrorMessage);
            }

        }

Thanks

icon

Best answer by praveenpo 2 October 2023, 12:42

View original

2 replies

Userlevel 6
Badge +3

Hi @bhagyat25 ,

Here is the sample code to display pop up message.

WebDialogResult result = <ViewName>.Ask(ActionsMessages.Warning, PXMessages.LocalizeFormatNoPrefix("My Message"),
                MessageButtons.OKCancel, MessageIcon.Warning, true);
            //checking answer    
            if (result != WebDialogResult.OK) return;

Userlevel 3
Badge

Hi @bhagyat25 ,

Here is the sample code to display pop up message.

WebDialogResult result = <ViewName>.Ask(ActionsMessages.Warning, PXMessages.LocalizeFormatNoPrefix("My Message"),
                MessageButtons.OKCancel, MessageIcon.Warning, true);
            //checking answer    
            if (result != WebDialogResult.OK) return;

Hi Praveen,

I already applied that but the problem is only one time that message comes. For the next error message that popup is not comming.

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