Display Message on UI

We have a PX that is validating data and when it finds something wrong we need to let the user know.  Is there a way to broadcast a message to the UI telling the user what they need to know?

There are system messages displayed such as “Record has been saved or Part has been added”.  We would like to access something like that in the banner on the current page.

Thx, Pete

Add Comment
2 Answer(s)

Hi Pete,

 

Please find the sample code below .

Java PX:

return new ActionResult(ActionResult.EXCEPTION, new Exception(“Error Message”));

Script PX:

import  com.agile.agileDSL.ScriptObj.AgileDSLException;

throw new AgileDSLException(“Error Message”);

 

Regards,

Karthik

Agile Talent Answered on August 18, 2019.
Add Comment

Hi Karthik, this code does not display the message in the UI page, it writes to the log.  We need to display a notice to the user in real time on the page they are looking at.

Any thoughts?

Agile User Answered on August 28, 2019.

How is your Event Subscriber set up to handle errors. “Execution Mode” needs to be “Synchronous” and  “Error Handling Rule” should be set to “Stop” and that should display the Exception Message

on August 29, 2019.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.