cancel
Showing results for 
Search instead for 
Did you mean: 

B1 SDK: Adding Freight To Sales Order to Line Items

former_member272979
Participant
0 Kudos

I’m currently trying to add freight to sales orders to line items. Below is the current code I have.

Dim retVal As String
Dim oOrd As SAPbobsCOM.Documents

oOrd = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oOrders)

oOrd.CardCode = "C000002"
oOrd.DocDueDate = "2018-10-31"
oOrd.Comments = "Test by William"
oOrd.Lines.ItemCode = "Referral Fee on Item Price"
oOrd.Lines.Quantity = 1
oOrd.Lines.TaxCode = "TAXNO"
oOrd.Lines.Price = 0
oOrd.Lines.Expenses.LineTotal = -5
oOrd.Lines.ExpenseType = 1
oOrd.Lines.Add()

retVal = oOrd.Add()

After executing the code, this is the result I get.

The result I wanted to get is what is shown below on the highlighted row

Can you advise what do I need to revise to get the desired result?

Regards,

William

Accepted Solutions (0)

Answers (1)

Answers (1)

patrice_vigier
Participant
0 Kudos

Did you find a solution?