public static CurrencyExchangeRate currencyConversion(CurrencyCode fromCurrencyCode, CurrencyCode toCurrencyCode) { ExchangeRateCurrencyPair exchangeRateCurrencyPair,exchangeRateCurrencyPair2; ExchangeRateDisplayFactor exchangeRateDisplayFactor; ExchangeRate exchangeRate; date validFromDate = dateNull(); date validToDate = dateMax(); CurrencyCode _fromCurrencyCode = fromCurrencyCode; CurrencyCode _toCurrencyCode = toCurrencyCode; ExchangeRateTypeRecId _exchangeRateType2; boolean _getReciprocalIfPrimaryNotFound = true; CurrencyExchangeRate exchRateValue; _exchangeRateType2 = ExchangeRateType::findByName(Exchange Rate Type).RecId; select firstonly ExchangeRateDisplayFactor from exchangeRateCurrencyPair where exchangeRateCurrencyPair.FromCurrencyCode == _fromCurrencyCode && exchangeRateCurrencyPair.ToCurrencyCode == _toCurrencyCode && exchangeRateCurrencyPair.ExchangeRateType == _exchangeRateType2; if(exchangeRateCurrencyPair.ExchangeRateDisplayFactor) { select firstonly validtimestate(validFromDate, validToDate) exchangeRate where exchangeRate.ExchangeRateCurrencyPair == exchangeRateCurrencyPair.RecId; exchRateValue = ExchangeRateHelper::displayStoredExchangeRate_Static( exchangeRate.ExchangeRate, exchangeRateCurrencyPair.ExchangeRateDisplayFactor); } else { select firstonly ExchangeRateDisplayFactor from exchangeRateCurrencyPair2 where exchangeRateCurrencyPair2.FromCurrencyCode == _toCurrencyCode && exchangeRateCurrencyPair2.ToCurrencyCode == _fromCurrencyCode && exchangeRateCurrencyPair2.ExchangeRateType == _exchangeRateType2; if(exchangeRateCurrencyPair2.exchangeRateDisplayFactor) { select firstonly validtimestate(validFromDate, validToDate) exchangeRate where exchangeRate.ExchangeRateCurrencyPair == exchangeRateCurrencyPair2.RecId; exchRateValue = exchangeRateCurrencyPair2.ExchangeRateDisplayFactor / ExchangeRateHelper::displayStoredExchangeRate_Static( exchangeRate.ExchangeRate, exchangeRateCurrencyPair2.ExchangeRateDisplayFactor); } } return exchRateValue; }
Wednesday 4 March 2015
Getting exchange rate value in ax 2012
Subscribe to:
Post Comments (Atom)
Calculate ledger balance by dimension set in X++ in AX2012/Dynamics 365 FO
There are a variety of ways users can view balances in the general ledger. Some of the most common options are: 1. Trial balance 2. Financia...
-
Introduction The query statement in X++ is a primary method of retrieving and manipulating data in Microsoft Dynamics AX 2012. A query can...
-
There is a easy way to find or getting the main account number separated from LedgerDimension (RecId). Main Account table holds the metho...
Wow, Excellent post. This article is really very interesting and effective. I think its must be helpful for us. Thanks for sharing your informative.
ReplyDeleteearn money online | outsourcing | high traffic USA forum list | free seo tools | get money for sharing youtube videos | minecraft | clash of clans
Free porn sex videos & pussy movies | ultimate xxx porn | sex and pussy tube | free sex movies | Hard Fuck Girls | Dolls Porn | Free porn HD | Hot Teens HD | Xxx Porn Tube | Sex Tube Fuck | Hard Anal Porn | Wife Sex | Spy Sex Tube | Mature Porn Videos | New Sex Tube | Top Sex Clips | Video Sex Party | Mature Fucking | Fat Fuck Movies | Big Tits Mature | Best Classic Xxx | Sex Porn Asian | Teen Sex Reality