getting a list of errors
Moderator: Phil Barton
-
- Posts: 68
- Joined: Tue Mar 03, 2020 5:23 pm
getting a list of errors
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?
-
- Posts: 1382
- Joined: Wed Jan 15, 2014 3:50 pm
- Location: Raleigh, NC
- Contact:
Re: getting a list of errors
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.
This is the same process that the Select GUI uses to display information in the Errors and Warnings panel.
Code: Select all
IOrder order = ...
IEnumerable<IOrderMessage> msgs = order.GetMessages();
Bob Richards, Senior Software Developer, SoftPro