Maximo

 View Only

 How to Handle MXApplicationYesNoCancelException in APPBEAN/DATABEAN Scrpt

Jump to  Best Answer
윤빈 신's profile image
윤빈 신 posted Tue November 25, 2025 12:42 AM

If MXApplicationException is just thrown at the autoscript, error message will be something like "error in script SOMESCRIPT at line 5 ..." - which is not so user friendly.

DataBeanContext class extends ScriptService class, so I can use ctx.error("errgroup", "errkey", ["errparam"]) to show error message properly.

But if I use ctx.yncuserinput() in APPBEAN script, I get this error in the dialog:
java.lang.NullPointerException: Cannot invoke "psdi.security.UserInfo.getConnectionKey()" because "ui" is null 

So how can I handle MXApplicationYesNoCancelException in APPBEAN/DATABEAN scrpt?

Jason VenHuizen's profile image
Jason VenHuizen IBM Champion  Best Answer

I wrote a post about this a while back that may be helpful for you.

https://www.sharptree.io/blog/2022/2022-01-24-yes-no-cancel/