How to return custom message from event

Hello All,

I have a form where I am checking to see if the user entered EITHER an amount or a percentage, but not both.
On the ROW_INSERTING and ROW_UPDATING I have the following code:
if([“price_amount”] <> 0 && [“amount_percent”] <> 0) {
return FALSE;
} else {
return TRUE;
}
The message that comes back is “Error Updating”.
Ideally I would like to change the message to something useful for the end user (“You can only have an amount or percentage, but not both”) or whatever.

How would I go about doing that?

Thanks,

craigbert

Before the “return FALSE;” line, simply insert the following code:

$this->setFailureMessage(“Your message goes here …”);

Thanks.

I am away from my Windows machine right now so I will try this in a in a wee bit.

Sincerely,

craigbert