Page 1 of 1

getting a list of errors

Posted: Tue Dec 28, 2021 5:16 pm
by bandorganman
After creating an order and populating it with data when I applyChanges it results in an error saying the order has many errors. How do I get a list of these errors?

Re: getting a list of errors

Posted: Fri Dec 31, 2021 6:17 pm
by BobRichards
We can get the list of all errors and warnings from the order's IOrder.GetMessages() interface. There is one IOrderItem object per error/warning/information message. See the SDK to view the IOrderItem properties.

Code: Select all

IOrder order = ...
IEnumerable<IOrderMessage> msgs = order.GetMessages();
This is the same process that the Select GUI uses to display information in the Errors and Warnings panel.