Skip to content

Latest commit

 

History

History
50 lines (33 loc) · 2.03 KB

retrieve-currency-exchange-rate.md

File metadata and controls

50 lines (33 loc) · 2.03 KB
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
developer
JimDaly
phecke

Sample: Retrieve currency exchange rate

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

How to run this sample

[!includecc-how-to-run-samples]

What this sample does

The RetrieveExchangeRateRequest message is intended to be used in a scenario where it contains data that is needed to retrieve the exchange rate.

How this sample works

In order to simulate the scenario described in What this sample does, the sample will do the following:

Setup

  1. Checks for the current version of the org.
  2. The TransactionCurrency method creates a new currency for the sample.

Demonstrate

The RetrieveExchangeRateRequest message retrieves the exchange rate against the base currency of the org.

Clean up

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]