Skip to Content
0

Create Journal Entry With DI Api Error

May 15, 2017 at 10:08 PM

250

avatar image

Hi everybody,

I have a problem in creating journal entries with DI api.

When i would like to add the journal entry, it has an error:

  • Error Code: -5002
  • Error Message: You cannot edit totals in system currency [JDT1.SYSCred][line:1]

Here is my code:

JournalEntries entry = Company.GetBusinessObject(BoObjectTypes.oJournalEntries);

entry.DueDate = DateTime.Now;

entry.ReferenceDate = DateTime.Now;

entry.TaxDate = DateTime.Now;

entry.Series = 14;

entry.Lines.FCDebit = 0;

entry.Lines.FCCredit = 0;

entry.Lines.Debit = 6000;

entry.Lines.Credit = 0;

entry.Lines.DueDate = DateTime.Now;

entry.Lines.ShortName = "111000000";

entry.Lines.ReferenceDate1 = DateTime.Now;

entry.TaxDate = DateTime.Now;

entry.Lines.Add();

entry.Lines.FCDebit = 0;

entry.Lines.FCCredit = 0;

entry.Lines.Debit = 0;

entry.Lines.Credit = 6000;

entry.Lines.DueDate = DateTime.Now;

entry.Lines.ShortName = "491000000";

entry.Lines.ReferenceDate1 = DateTime.Now;

entry.TaxDate = DateTime.Now;

entry.Add();

Thanks for helping!

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

0 Answers