on 02-04-2004 4:03 PM
In SDK 6v2 adding a salesorder works fine.
Doing the same unter 6v5 produces an error message:
"Update quantity in purchase order?[RDR1.Quantity][line: 2]
Does anyone have an idea whats going wrong ?
This are the lines of Code I use to add an order:
Dim sap_so As SAPbobsCOM.Documents
Set sap_so = sbo_cx.GetBusinessObject(Object:=oOrders)
With sap_so
.DocDueDate = VBA.Date
.CardCode = "C00001"
With .Lines
.ItemCode = "SP-2010.082"
.Quantity = 10
.ShipDate = VBA.Date
.WarehouseCode = "01"
.Price = 50
.Add
End With
.DocTotal =10
lReturnCode = .Add
End With
The 6.5 API automatically creates a line (Document_Lines object) when the business object is created.
This means, you must not "Add" the line you have just filled. Instead, this creates a second (empty !) line.
Regards,
Frank
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My pleasure!
Regards,
Frank
PS: Please use - as long as this is the only "SAP Business One" forum in SDN - a prefix for your posts like "UI: ", "DI: " etc. whenever suitable. This makes monitoring and searching perhaps somewhat easier when the number of posts will be heavily increasing 😉
Thank you in advance!
User | Count |
---|---|
107 | |
12 | |
11 | |
6 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.