Introduction

Tips

In this paper:

  1. the base currency is the US dollar

  2. I experimented with two new entities, the Invoice entity and the Invoice Detail entity, which are one-to-many relationships

Basic concept

Currency is a field type in Dynamics CRM that is used to store monetary values. When you create a “Currency Field” in an entity, the system creates four fields in the background.

For example, if I add a new Amount currency field in Invoice Detail entity, the following fields will be created in the backend:

new Amount currency field in Invoice Detail entity

new Amount currency field in Invoice Detail entity

  • gdh_amount ,Store “real monetary value”
  • gdh_amount_Base ,Stores the conversion of the “real currency value” to the “base currency” based on the “exchange rate”.

Two additional fields:

  • Currency
  • Exchange Rate

New Currency

Open Power Platform Admin Center –> select “Environment” –> go to “Settings” –> select “Currency”.

Adding Currency to the Power Platform Management Center-01

Adding Currency to the Power Platform Management Center-01

On the pop-up page, add a new currency.

Adding Currency to the Power Platform Management Center-02

Adding Currency to the Power Platform Management Center-02

For the sake of experimentation, I added two currencies: the Chinese Yuan and the Japanese Yen, and the newly created messages are as follows:

Currency NameCurrency CodesCurrency SymbolsExchange RatesCurrency Accuracy
US DollarUSD$1.00002
RMBCNY7.25002
JPYJPYJPY¥147.63002
Warning
  1. Dynamics CRM does not recalculate all currency fields when exchange rates are updated

  2. Exchange rate Set by system administrator

New Experimental Data

No.CurrencyAmountAmount(Base)Exchange Rate
SASD-00001260JPYJPY¥ 1,000.00$6.77147.6300000000
SASD-00001259US Dollar$1,000.00$1,000.001.0000000000
SASD-00001258RMB¥ 1,000.00$137.937.2500000000
New Experimental Data

New Experimental Data

As you can see, if the selected currency is not the base currency, Amount(Base) is automatically calculated based on Amount and Currency.

Adding summaries for currencies

What happens when a currency is added to the summary? I add a new Example - Total Amount currency field to the Invoice entity:

Adding summaries for currencies

Adding summaries for currencies

The aggregation rules are as follows:

Aggregation Rules

Aggregation Rules

Summarize the results:

You can see that Example - Total Amount is summarized based on the current currency field,

which is: Currency –> Rate –> Example - Total Amount(Base) * Rate

Summarize the results

Summarize the results

Tips
  1. In CRM, summary fields are regularly updated and the update frequency can be set in the system job, but the fastest update frequency is hourly.

  2. In addition, the summary calculation can also be triggered manually to perform the calculation by clicking on the “keypad” next to the summary field –> click on the “Recalculate” button as shown in the screenshot below.

Manually trigger summary fields for calculation

Manually trigger summary fields for calculation

About User Default Currency

Currently, the base currency of our environment is USD, in fact, in CRM, each user can set their own default currency, if the user has set a default currency for themselves, then when they create a new Invoice record, the Currency field will be assigned to the user’s own default currency by default.

About User Default Currency-01

About User Default Currency-01

For example, I set the default currency to Yen for the test06 user, and then go to create a new Invoice record

About User Default Currency-02

About User Default Currency-02

As you can see, the Currency field in the new form has been assigned a value of JPY by default.

About User Default Currency-03

About User Default Currency-03

Refer

  1. Create and edit columns for Microsoft Dataverse using Power Apps solution explorer
  2. Using currency columns