Customization question - exception processing

I ended up getting rid of the messagebox and just putting my message text on the exception
Throw new UIException ("My message here.")

--- In vantage@yahoogroups.com, "k_stump" <kristi.stump@...> wrote:
>
> I am writing a customization on Sales Order to not allow add new Line or add new Release when a UD field on the Order Header is false.
> Following the example in the embedded customization course book, I send a messagebox with yes and no buttons. Yes is to Cancel the operation.
> The example then has
> If Result = DialogResult.Yes Then
> oTrans.Undo
> Throw new UIException
> End if
>
> I just want to undo the added line and show a refreshed screen.
> If I remove the Throw new .. line, I get an index error:
> "Index was outside the bounds of entry"
>
> Is there a way to do the exception so it doesn't put another message box to the screen?
>
> Thanks
> Kristi
>
I am writing a customization on Sales Order to not allow add new Line or add new Release when a UD field on the Order Header is false.
Following the example in the embedded customization course book, I send a messagebox with yes and no buttons. Yes is to Cancel the operation.
The example then has
If Result = DialogResult.Yes Then
oTrans.Undo
Throw new UIException
End if

I just want to undo the added line and show a refreshed screen.
If I remove the Throw new .. line, I get an index error:
"Index was outside the bounds of entry"

Is there a way to do the exception so it doesn't put another message box to the screen?

Thanks
Kristi