Skip to Content

DI API Error adding IncomingPayment to Account

Aug 30, 2017 at 06:59 PM


avatar image
Former Member

I'm trying to add an IncomingPayment on a business partner account via the di api and receiving the following error:

"Amount to be paid does not match existing transactions"

returnCode is "-10"

It's basically this question, but the guy never posted the answer.

Here is my code:

SAPbobsCOM.Payments oPmt;
var record = ((SAPbobsCOM.Payments)(oCompany.GetBusinessObject SAPbobsCOM.BoObjectTypes.oIncomingPayments)));

record.DocType = BoRcptTypes.rAccount;
record.CardCode = "C00001";
record.DocDate = DateTime.Now;
record.DueDate = DateTime.Now.AddDays(2);
record.AccountPayments.AccountCode = "_SYS00000000026";
record.AccountPayments.SumPaid = 100;
record.TransferDate = DateTime.Today;
record.TransferSum = 100;
record.CashAccount = "1010100100000";
record.TransferAccount = "1020400100000";

var returnCode = record.Add();
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

avatar image
Former Member Sep 05, 2017 at 08:40 PM

I am stuck on this as well. Anyone know?

10 |10000 characters needed characters left characters exceeded