AX 2012 Exchange rates dataarea id

Hi,

I am writing some procedures on AX 2012 sql db. I am trying to find the links for the Exchange rates table with the company info table. I mean I need to extract the exchange rates by dataaread id wise. There can be many companies and each company will have its own exchange rates. In AX 2009 i can get it by the field data areadid .But here there is not such field in the exchange rates table. Please can anyone help me to get the field of dataareaid for all the exchange rates. Let me know if my question is not clear.

Thanks

Exchange rates are now shared across companies, so you can’t simply apply the logic from AX2009. An analogous solution exists, though. Legal entity is mapped to Ledger (table), which has DefaultExchangeRateType (field). That maps Ledger to ExchangeRateCurrencyPair records and each ExchangeRateCurrencyPair has date-effective ExchangeRate records.

It’s difficult to get it all right (date-effective data, triangulation etc.) and you even shouldn’t duplicate this logic in your application. If you need to read data from database, you will benefit a lot from using ExchangeRateEffectiveView (view). Other options exist, such as LedgerExchangeRateService web service or .NET Interop to X++.

Definitely read Shared Currencies and Exchange Rates for Microsoft Dynamics AX 2012, it contains a lot of information about the data model and APIs.

To state it explicitly: any direct access to AX database is discouraged, because it bypasses everything handled by AX application layer (especially security) and you can’t reuse any AX business logic (including expansion of surrogate keys, for example).

Thanks Martin. I will check with the attachment.