cancel
Showing results for 
Search instead for 
Did you mean: 

displaying documentLines

Former Member
0 Kudos

hi, i need sample to display lines of an order...My code doesn't work:

for (i=1;i<oOrder.Lines.Count;i++)

{

try

{

Console.Out.WriteLine("ItemCode:"oOrder.Lines.ItemCode"LineNum:"+oOrder.Lines.LineNum

"DocEntry"oOrder.DocEntry"Quantity:"oOrder.Lines.Quantity);

}

catch(Exception e)

{

Console.Out.WriteLine(e);

}

When i do this i got always the same line with a lineNum=0;

I think im going in the wrong way, somebody has an exemple to show me??

Thank you...

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

You will need to call setcurrentline before doing anything, because the lines object is not exposed as a collection, and therefore has no direct indexer parameter.

or (i=1;i<oOrder.Lines.Count;i++)

{

try

{

// Set the current order line

oOrder.Lines.SetCurrentLine(i - 1);

Console.Out.WriteLine("ItemCode:"oOrder.Lines.ItemCode"LineNum:"+oOrder.Lines.LineNum

"DocEntry"oOrder.DocEntry"Quantity:"oOrder.Lines.Quantity);

}

catch(Exception e)

{

Console.Out.WriteLine(e);

}

Former Member
0 Kudos

Thank you Demetree, it works now...

Answers (0)