HotSpot Address or Contact
Posted: Tue Aug 30, 2016 10:53 am
I did a Raise Warning event --> e.AddWarning(e.Order, "Address1", reason), and I want to HotSpot for the 2nd address lets say or specific Contact. How can I do this?
Free support for custom code within SoftPro's products, monitored by SoftPro employees with a 24-48 hr expected turn time on business days.
https://devforum.softprocorp.com/
Code: Select all
void Handler(object o, OrderSavingEventArgs e)
{
// Get the address IOrderItem for the second underwriter (NO ERROR CHECKING).
IOrder order = e.Order;
IList underwriters = (IList)order.GetProperty("Underwriters");
IOrderItem underwriter = (IOrderItem)underwriters[1];
IOrderItem address = (IOrderItem)underwriter.GetProperty("Address");
// Add warning.
e.AddWarning(address, "Address1", "Bad address");
}