title | description | ms.date | author | ms.author | ms.reviewer | ms.topic | search.audienceType | contributors | |||
---|---|---|---|---|---|---|---|---|---|---|---|
Sample: Retrieve currency exchange rate (Microsoft Dataverse) | Microsoft Docs |
This sample shows how to create a new currency and retrieve and display currency exchange rate. |
04/03/2022 |
JimDaly |
jdaly |
pehecke |
sample |
|
|
This sample shows how to create a new currency, and how to retrieve and display the currency exchange rate relative to the organization’s base currency.
[!div class="nextstepaction"] SDK for .NET: Retrieve currency exchange rate sample code
[!includecc-how-to-run-samples]
The RetrieveExchangeRateRequest
message is intended to be used in a scenario where it contains data that is needed to retrieve the exchange rate.
In order to simulate the scenario described in What this sample does, the sample will do the following:
- Checks for the current version of the org.
- The
TransactionCurrency
method creates a new currency for the sample.
The RetrieveExchangeRateRequest
message retrieves the exchange rate against the base currency of the org.
Display an option to delete the sample data created in Setup. The deletion is optional in case you want to examine the tables and data created by the sample. You can manually delete the records to achieve the same result.
[!INCLUDEfooter-include]