cancel
Showing results for 
Search instead for 
Did you mean: 

Additional expenses on existing delivery

Former Member
0 Kudos

Im trying to add additional expenses on delivery which is created already and has no invoice (customer direction).

I have code

Dim odocument As SAPbobsCOM.Documents
            odocument = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
            If odocument.GetByKey(docentry) Then

                odocument.Expenses.Add()
                odocument.Expenses.SetCurrentLine(1)
                odocument.Expenses.ExpenseCode = 1
                odocument.Expenses.LineTotal = value

                Dim err_code As Integer
                err_code = odocument.Update()
                Dim err_msg As String

                If err_code <> 0 Then
                    oCompany.GetLastError(err_code, err_msg)
                    MsgBox(err_msg)
                End If

            End If

but it alwazs ends with internal error after .update. Is it even possible to update existing delivery with expenses through DI?

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Have you tried manually update this existing delivery with additional expenses? If you can, update should work from DI too. Otherwise, it is not possible.

Thanks,

Gordon

Answers (1)

Answers (1)

Former Member
0 Kudos

not possible