Skip to Content
0
Former Member
May 17, 2005 at 09:15 AM

oPurchaseOrder.Add() doesn't reset oPurchaseOrder.Lines

30 Views

Hi

I'm not sure if this is by design but when i have to insert multiple purchase orders (+lines) and do it like:

        oO = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseOrders)
        oO.CardCode = "20003"
        oO.Lines.ItemCode = "02-00-00287-IN"
        oO.Lines.Quantity = "1"
        oO.Lines.Add()
        oO.Lines.ItemCode = "021-02720"
        oO.Lines.Quantity = "1"
        retcode = oO.Add()
        oO.CardCode = "20068"
        oO.Lines.ItemCode = "02-00-00287-IN"
        oO.Lines.Quantity = "1"
        retcode = oO.Add()

I get 2 Purchase Order with 2 Lines (which is strange) in each.

Even with a oO.Close() after the first order i have this behaviour.

TIA

Philipp