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

Access to KeyFigureCodes ("Nøgletal") through the .NET API

Anyone knows how to access the keyfigurecodes (Nøgletalskode) from each account through the .NET API? I would have expected to find this field in the IAccount intefcace?

Thanks in advance.

created Apr 6, 2013 by Bobby2000
0% Accept Rate

retagged Apr 6, 2013 by Bobby2000
Q 2 A 0 C 0

1 Answer

Hi Bobby2000,


Key figure codes cannot currently be set on accounts in the API.

However, the KeyFigureCode entity does have a GetAccounts() method, which returns the accounts currently linked to each KeyFigureCode.

This can be utilized to e.g. simulate aggregating financial entries by key figure codes, similar to the key figure report in the e-conomic application: For each key figure code, get its array of accounts using the above-mentioned GetAccounts() method. Then, used that array to throw at AccountUtil.GetEntryTotalsByDate() - which takes an Account array and a date interval as inputs, and return an array of decimals indicating entry total amounts for the date interval specified for each account in the supplied array.

- which is obviously several orders of magnitude faster than downloading and aggregating individual entries :-)


Best regards,
answered Apr 24, 2013 by Christian Estrup
Visma e-conomic A/S