Skip to Content
0
Feb 02, 2023 at 06:58 AM

LineNum vs VisOrder in sales order line SAP business one DI api

186 Views Last edit Feb 02, 2023 at 10:21 PM 3 rev

linenumbervisno.png

i am using the following code to update a line

it fails on the SetCurrentLine - "invalid row error "

the order has 3 line items ( all open )

however the rdr1 table LineNum is

0 , 2 , 3 for the three rows

and for the VisOrder column it is

0 , 1 , 2 for the corresponding rows

what column value should I use in setting current line ? LineNum or VisOrder ?

SAPbobsCOM.Documents oOrders = (SAPbobsCOM.Documents)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders);
oOrders.GetByKey(intKey);
oOrders.Lines.SetCurrentLine(3);<br>

Attachments