Good morning,
I'm a x++ developer and I'm facing an issue and it seems taking me long than I did expect so I would really appreciate your help.
In fact, I have a condition that must be satisfied when creating a purchLine. so I'm handling it in validateWrite method of the PurchLine.
in case the condition is not true I'm throwing an error :
throw Error("some text");
In this case, all works good and I got the message displayed in the message bar.
However, when I try to add a product (as figure shows) I have the message displayed in the Action center whereas it is needed to act the same way, and be displayed in the message bar instead.

Greatful for your help.