Skip to Content
0
Former Member
Aug 04, 2009 at 11:28 AM

How to Update with BatchNumbers

26 Views

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.