Using method getBPLIST() to get list of all orders in SAP Business One

SAPBusiness

I would suggest using recordset with DI API −

SAPbobsCOM.Recordset rs =
((SAPbobsCOM.Company)oCompany.GetDICompany()).GetBusinessObject(BoObjectTypes.BoRecordset);
rs.DoQuery("SELECT DocEntry, DocNum, DocDate, TaxDate, CardCode, CardName, DocTotal
   FROM OPOR ORDER BY DocDate ASC");

while (!rs.EoF) {
   int DocEntry = rs.Fields.Item("DocEntry").Value;
   //OR
   DocEntry = rs.Fields.Item(0).Value;
   rs.MoveNext();
}
raja
Published on 19-Dec-2017 08:42:18
Advertisements