Hi,
currency::find(CurrencyCode).findExchRate(today()); in Dynamic ax 2009 following code is for Dynamic AX 2012
static ExchRate exchRateFind(CurrencyCode _currencyCode = '')
{
ExchangeRateType ExchangeRateType;
// ExchangeRate ExchangeRate;
ExchangeRateCurrencyPair ExchangeRateCurrencyPair;
ExchRate ret;
ExchangeRateHelper exchangeRateHelper;
TransDate transactiondate;
CurrencyExchangeRate exchangeRate1;
CurrencyExchangeRate exchangeRate;
;
exchangeRateHelper = ExchangeRateHelper::newExchangeDate(Ledger::current(), _currencyCode, systemDateGet());
exchangeRate1 = exchangeRateHelper.getExchangeRate1();
exchangeRate = exchangeRateHelper.displayStoredExchangeRate(exchangeRate1);//Ledger::find(Ledger::current()).DefaultExchangeRateType
return exchangeRate;
}
Regards,
currency::find(CurrencyCode).findExchRate(today()); in Dynamic ax 2009 following code is for Dynamic AX 2012
static ExchRate exchRateFind(CurrencyCode _currencyCode = '')
{
ExchangeRateType ExchangeRateType;
// ExchangeRate ExchangeRate;
ExchangeRateCurrencyPair ExchangeRateCurrencyPair;
ExchRate ret;
ExchangeRateHelper exchangeRateHelper;
TransDate transactiondate;
CurrencyExchangeRate exchangeRate1;
CurrencyExchangeRate exchangeRate;
;
exchangeRateHelper = ExchangeRateHelper::newExchangeDate(Ledger::current(), _currencyCode, systemDateGet());
exchangeRate1 = exchangeRateHelper.getExchangeRate1();
exchangeRate = exchangeRateHelper.displayStoredExchangeRate(exchangeRate1);//Ledger::find(Ledger::current()).DefaultExchangeRateType
return exchangeRate;
}
Regards,