Currency Conversion Factor

The CurrencyConversionFactor model is used by Platform currency conversion framework when the API of a CurrencyConverter is "Data".

Creating CurrencyConversionFactor

Creating a CurrencyConversionFactor is just like creating any other model and can be done via XML or CSV and loaded into the database as part of the dataset.

Table 5.2. CurrencyConversionFactor Fields

Field

Description

CurrencyConverter

CurrencyConverter instance for which this factor applies. (KEY field)

FromCurrency

Currency from which the factor applies. (KEY field)

ToCurrency

Currency to which the factor applies. (KEY field)

EffectiveStartInclusive

Date at which the factor becomes applicable. (KEY field)

EffectiveEndExclusive

Date at which the factor is no longer applicable. (KEY field)

Factor

Factor used to convert FromCurrency to ToCurrency. For example, if FromCurrency is USD and ToCurrency is EUR, the factor might be 0.89.

Overlapping of effectivity dates are not allowed for the same FromCurrency/ToCurrency currency combination. Gaps are OK, but will result in a runtime exception in the event the gap is hit during conversion. Also you must explicitly create factors in both directions for a currency pair - the framework will not automatically invert the factor for a reverse conversion.