Skip to main content
Solved

Display message in event handler

  • February 8, 2021
  • 3 replies
  • 448 views

Forum|alt.badge.img
  • Jr Varsity III
  • 23 replies

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.

 

Best answer by Naveen Boga

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?

View original
Did this topic help you find an answer to your question?

3 replies

Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3410 replies
  • Answer
  • February 8, 2021

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?


Forum|alt.badge.img
  • Author
  • Jr Varsity III
  • 23 replies
  • February 8, 2021

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!


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • 3410 replies
  • February 8, 2021

@mhaps

mhaps wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings