AddError for Order Type

Discussions related to custom development with Select.
Post Reply
tmeisinger
Posts: 75
Joined: Fri Apr 24, 2015 10:33 am

AddError for Order Type

Post by tmeisinger »

I'm validating that the Order type is in sync with our internal system on Order Saving.

I identified the Order type field with the Context of Order and the Name Type

If I attempt to AddError(e.Order, "Type", "Wrong Order type"), I get an Error on Saving, but the 'Errors and Warnings is not populated with the error message or the hot link to Type.

I don't receive any internal error messages in my code, so I'm guessing the Context and Name is wrong, but not sure how to resolve. Help?
BobRichards
Posts: 1377
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: AddError for Order Type

Post by BobRichards »

Can you post your code for this area?
Bob Richards, Senior Software Developer, SoftPro
tmeisinger
Posts: 75
Joined: Fri Apr 24, 2015 10:33 am

Re: AddError for Order Type

Post by tmeisinger »

Bob, I resolved this by using:

e.AddError((IOrderItem)order, "Type", "Wrong Order Type")

and it is working now. I should have updated this last week.

Sorry,
-TM
Post Reply