getting a list of errors

Discussions related to SoftPro Select user interface development.

Moderator: Phil Barton

Post Reply
bandorganman
Posts: 68
Joined: Tue Mar 03, 2020 5:23 pm

getting a list of errors

Post 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?
BobRichards
Posts: 1376
Joined: Wed Jan 15, 2014 3:50 pm
Location: Raleigh, NC
Contact:

Re: getting a list of errors

Post 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.
Bob Richards, Senior Software Developer, SoftPro
Post Reply