Thursday, 27 February 2014

Currency Conversion

static void ExchangeRate(Args _args)
{
    Currency  currency;
    Ledger                          ledger;
    ExchangeRateCurrencyPair        exchangeRateCurrencyPair;
    ExchangeRate                    exchangeRate;
    AmountMST                       amountMST;
    CurrencyCode                       tocurrency = 'EUR';
   
     //ledger::find(ledger::current()).ReportingCurrency
   
    amountMST = currency::amountCur2MST(100,tocurrency,
            ExchangeRate::findByDate(exchangeRateCurrencyPair::find(exchangeRate.RecId).RecId,
                                                     exchangeRate.ValidFrom).ExchangeRate);
    info(strFmt("%1",amountMST));
   
   
}

No comments:

Post a Comment

Best Practices for Troubleshooting Application Issues in D365 and Power Platform

When facing application issues, it’s important to systematically troubleshoot before reaching out for support.  Follow these steps to ensure...