web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Exchange rate (Purchase Order)

(0) ShareShare
ReportReport
Posted on by 1,295

Hi guys,

I would like to seek help from you guys. I have questions:

1. PurchTable has Currency Code Field and I would like to ask if how to get the rate(in ExchangeRateCurrencyPair Table) but i have created a code: 

display VendExchRate dispExchangeRate()
{
ExchangeRate exchangeRate;
ExchangeRateCurrencyPair exchangeRateCurPair;
PurchTable purchTable;
PurchLine purchLine;
VendTable vendTable;


//Select query - Purch Table

select * from vendTable join exchangeRateCurPair where this.Currency == exchangeRateCurPair.FromCurrencyCode;

//Select query - Exchange Rate Currency Pair

select * from exchangeRate where exchangeRate.RecId == exchangeRateCurPair.RecId ;


return exchangeRate.ExchangeRate;
}

2. 

The currency CNY -MYR conversion has 2 data which displays valid exchange rates for the date range how to display according date range?

Hoping for your fast Response.

*This post is locked for comments

I have the same question (0)
  • Verified answer
    SII1MNL Profile Picture
    1,295 on at
    RE: Exchange rate (Purchase Order)

    I solved my problem on how to get the exchange rate based on the currency given on start date in Exchange Rate Table.

    To get the exchange rate base on currency in PurchTable:

    "ExchangeRateHelper::getExchangeRate1_Static(Ledger::current(),purchTable.CurrencyCode,today());"

    Thank you nitesh Ranjan also for the help and giving me the idea. :)

  • SII1MNL Profile Picture
    1,295 on at
    RE: Exchange rate (Purchase Order)

    12.gif

    "Please validate that this method exchangeRateHelper.getExchangeRate1 () is returning your expected value. "

    -I run my report and it throws an error. 

    I have 2 currency code here. Hope you can help me with this. I'm new to this. 

  • Community Member Profile Picture
    on at
    RE: Exchange rate (Purchase Order)

    As per my understanding you are on right track.

    Please validated that this method exchangeRateHelper.getExchangeRate1() is returning your expected value.

  • SII1MNL Profile Picture
    1,295 on at
    RE: Exchange rate (Purchase Order)

    purchOrderHistoryTmp.OrderAccount   = purchTable.OrderAccount;

    purchOrderHistoryTmp.PurchName      = purchTable.PurchName;

    purchOrderHistoryTmp.CurrencyCode   = purchTable.CurrencyCode;

    purchOrderHistoryTmp.LineAmount     = purchTable.amountInvoicedExclTax();

    "purchOrderHistoryTmp.ExchangeRate   = exchangeRateHelper.getExchangeRate1();"

    I add this "purchOrderHistoryTmp.ExchangeRate   = exchangeRateHelper.getExchangeRate1();" in my RDP class  and I want to connect it based from currency code in PurchTable. I don't know if it's right.

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Exchange rate (Purchase Order)

    you can use this class in your SSRS reports RDP class.

    A RDP class of a SSRS report basically populates a temp table which is basically a data set to a table.

    so in reports temp table create a field for exchange rate and populate the field using ExchangeRateHelper class

    Please verify and update us if this information helps you.

  • SII1MNL Profile Picture
    1,295 on at
    RE: Exchange rate (Purchase Order)

    So i can place it in SSRS report? To get the result, according from what date? Because I am creating a report and i need to display the rate of each currency code according from what date it was created.

  • Verified answer
    Community Member Profile Picture
    on at
    RE: Exchange rate (Purchase Order)

    Consider utilizing following class

    ExchangeRateHelper

    This class is having all the methods to find out the exchange rate value.

    Please verify and update us if this is helpful

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

#1
Guy Terry Profile Picture

Guy Terry 2 Moderator

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans