Solved

Display message in event handler

  • 8 February 2021
  • 3 replies
  • 383 views

Userlevel 2
Badge

Dear community,

 

I would like to show a message to the user from an event handler. In my case it is Events.RowInserted.

I tried throw new PXException and PXSetPropertyException. Both are logged to the Trace but nothing pops up in the browser.

 

Any help is welcome.

 

icon

Best answer by Naveen Boga 8 February 2021, 13:08

View original

3 replies

Userlevel 7
Badge +17

Hi @mhaps,

Have you tried with FieldUpdated event instead of RowInserting?

 

Also, can you please us know, on what scenario/condition you want to display error message?

Userlevel 2
Badge

That is a good idea @Naveen B. PXSetPropertyException with PXErrorLevel.RowError fired in FieldUpdated marks the Row as Invalid.

That solves my problem.

 

The aim is to limit the entries in the grid.

First try was setting AllowInsert. But that is not reliable, it seems to be set back after event handling.

 

Thanks!

Userlevel 7
Badge +17

@mhaps

First try was setting AllowInsert. But that is not reliable, it seems to be set back after event handling.

I agree with you :thumsup

 

Great :) Thanks a lot for the verification and update.

 

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