cancel
Showing results for 
Search instead for 
Did you mean: 

DI Inability to update a payment of type "Account"

Former Member
0 Kudos

Hi

I having problems when trying to update a payment of type "Account" via DI API, the following error message is displayed: "A valid Card Code must be insert".

Dim oPago As SAPbobsCOM.Payments
oPago = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oIncomingPayments)
oPago.GetByKey(123)
oPago.Reference1 = "Hola"
lRet = oPago.Update()

Please help

Regards

Jésica

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Perhaps you should select an oPago.CardCode = "CUST-XXX" before updating.

The GetByKey method should load it, but still... try selecting a BP before.

Former Member
0 Kudos

Hi Alfredo

Thanks, but de payment is to an account. The CardCode is loaded but is an account code, and I think this is the problem.

Thanks again

Jésica

barend_morkel2
Active Contributor
0 Kudos

Hi Jessica,

Add the account code as the cardcode. When the payment is on account SBO uses the account code as the "CardCode". This is not a problem - but you have to specify it.