Hi all,
I am looping the POPStandardItemLine or an Order using foreach loop. The item lines in the order consists of standard order line and a charge line. While looping, I encounter an error.
this is because 1 item in the POPStandardItemLine is a Charge line.
How can I loop the lines no matter what item is inside (standard item / free text item / charge line / discount line) ?
Sage.Accounting.POP.POPStandardItemLines lines = new Sage.Accounting.POP.POPStandardItemLines();
lines.Query.Filters.Clear();
lines.Find();
lines.Query.Filters.Add(new Sage.ObjectStore.Filter(Sage.Accounting.POP.POPStandardItemLine.FIELD_POPORDERRETURNDBKEY, order.POPOrderReturn));
lines.Find();
foreach(Sage.Accounting.POP.POPStandardItemLine line in lines) // the error happen here
{
//do something here
}