HI ERIC LAPOUGE,
Thanks your reply.
I made my code like you but still have error: Invalid values: [DLN1.INMPrice]
My code:
Dim oDel As SAPbobsCOM.IDocuments
oDel = PublicVariable.oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDeliveryNotes)
If oDel.GetByKey(146) = True
Then
oDel.CreateCancellationDocument()
lretCode = oDel.Add()
If lretCode <> 0 Then
PublicVariable.oCompany.GetLastError(lErrCode, sErrMsg)
EndIf
EndIf
Did my code miss something?
Regards
Canh