Adding order-specific errors to ErrorList

Discussions related to custom development with Select.
Post Reply
joe.mag
Posts: 122
Joined: Thu Aug 04, 2011 3:11 pm

Adding order-specific errors to ErrorList

Post by joe.mag »

SoftPro's own validtion logic adds order-specific messages to the ErrorList but I only see how to add global messages. As a result all my messages are jumbled together across all files. I don't see an interface on the IOrder or the OrderTracking.Client objects that would let me achieve this, either.

TIA
Mark McKenna

Re: Adding order-specific errors to ErrorList

Post by Mark McKenna »

The order "hook" should come from the OrderUri moniker that is passed to the IErrorList.Add() method.

Code: Select all

string message = "Error message";
ErrorKind kind = ErrorKind.Warning;
OrderUri moniker = new OrderUri( OrderKind.Order, orderID );

IErrorList errorList = sps.GetService<IErrorList>();
errorList.Add(message, kind, moniker);
Post Reply