API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

icashBookEntryData.DebtorInvoiceNumber not working

0
Hi
 
Using C#
 
In my project I have the code shown below. Everything is working as supposed. Except from the second last line. The setting of DebtorInvoiceNumber is not reflected.
That is, in my cashbook in economic (when I log in on e-conomic.dk) the data all shows up. Except, the DebtorInvoiceNumber isn't filled in. Everything else is. 
 
...
icashBookEntryData = EConomicSessionClass.m_eConomicSession.CashBookEntryData.GetData(icashBookEntry);
 
icashBookEntryData.Debtor = DebitorHandle;
icashBookEntryData.Account = AccountHandle;
icashBookEntryData.VatAccount = VatAccountHandle;
icashBookEntryData.Amount = Amount;
icashBookEntryData.AmountDefaultCurrency = Amount;
icashBookEntryData.VoucherNumber = VoucherNumber;
icashBookEntryData.Date = Date;
icashBookEntryData.Text = Text;
icashBookEntryData.ContraAccount = CounterAccountHandle;
icashBookEntryData.ContraVatAccount = ContraVatAccountHandle;
icashBookEntryData.DebtorInvoiceNumber = 1;                        <-------- This line seems to have no effect
 
EConomicSessionClass.m_eConomicSession.CashBookEntry.UpdateFromData(icashBookEntryData);
...
 
 
If I set the debtor invoice number from within e-conomic.dk it works, and it also shows in my application. So seems that I can "get" the value from the API but cannot "set" it.
 
Please help.
 
/Jesper
created Dec 22, 2014 by jsaxelsen
0% Accept Rate
Q 1 A 0 C 0

1 Answer

0

Hi Jesper

What kind of Cashbook Entry are you trying to create?

Please make sure to specify cashbook entry type to correctly create your cashbook entry.

<Type>DebtorPayment or CreditorInvoice or CreditorPayment or FinanceVoucher or ManualDebtorInvoice</Type>

https://api.e-conomic.com/secure/api1/EconomicWebService.asmx?op=CashBookEntry_CreateFromData

 

answered Jan 7, 2015 by olej
Visma e-conomic A/S
...