I try to update the BatchNumbers Object. It turns out nothing.
Function Update() returns 0.
SAPbobsCOM.Documents doc = (SAPbobsCOM.Documents)Git_DIApi.VCmp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oPurchaseDeliveryNotes); if (doc.GetByKey(1)) { doc.Comments = "*test*"; doc.Lines.BatchNumbers.Add(); doc.Lines.BatchNumbers.SetCurrentLine(0); doc.Lines.BatchNumbers.Quantity = 1; doc.Lines.BatchNumbers.BatchNumber = "1"; doc.Lines.BatchNumbers.Notes = "Test"; int iErr = doc.Update(); if (iErr != 0) { Git_UIApi.MessageBox(Git_DIApi.GetErrorMessage(Git_DIApi.VCmp, out iErr)); } }
So how to work with this BatchNumbers Object?
Please, help me.