Share via


Table Currency

ID 4
Namespace: Microsoft.Finance.Currency

Represents currency settings and exchange rate information used throughout the system. This table stores currency definitions, rounding settings, GL account mappings for currency transactions, and provides calculated fields for customer and vendor balances in specific currencies.

Properties

Name Value
Caption Currency
LookupPageID Page Microsoft.Finance.Currency.Currencies
Permissions tabledata "General Ledger Setup" = r
DataClassification CustomerContent

Fields

Name Type Description
Code Code[10]

Unique identifier code for the currency (e.g., USD, EUR, GBP). This field is required and must be non-blank.

"Last Date Modified" Date

Date when the currency record was last modified. This field is automatically maintained by the system.

"Last Date Adjusted" Date

Date when the currency exchange rates were last adjusted. This field is automatically maintained by the system.

"ISO Code" Code[3]

Three-letter ISO 4217 currency code (e.g., USD, EUR, GBP). Must be exactly 3 characters and contain only ASCII letters.

"ISO Numeric Code" Code[3]

Three-digit ISO 4217 numeric currency code (e.g., 840 for USD, 978 for EUR). Must be exactly 3 characters and contain only numeric digits.

"Unrealized Gains Acc." Code[20]

General Ledger account for posting unrealized currency gains. Used when currency exchange rates fluctuate positively between transaction and revaluation dates.

"Realized Gains Acc." Code[20]

General Ledger account for posting realized currency gains. Used when currency gains are actually realized through settlement of transactions.

"Unrealized Losses Acc." Code[20]

General Ledger account for posting unrealized currency losses. Used when currency exchange rates fluctuate negatively between transaction and revaluation dates.

"Realized Losses Acc." Code[20]

General Ledger account for posting realized currency losses. Used when currency losses are actually realized through settlement of transactions.

"Invoice Rounding Precision" Decimal

Precision used for rounding invoice amounts in this currency. Determines the smallest unit to which invoice totals are rounded (e.g., 0.01 for cents). Must be compatible with the Amount Rounding Precision setting.

"Invoice Rounding Type" Option

Method used for rounding invoice amounts when applying Invoice Rounding Precision. Options: Nearest (standard rounding), Up (always round up), Down (always round down).

"Amount Rounding Precision" Decimal

Precision used for rounding general amounts in this currency. Determines the smallest unit to which amounts are rounded during calculations.

"Unit-Amount Rounding Precision" Decimal

Precision used for rounding unit amounts (prices, rates) in this currency. Typically has higher precision than amount rounding for detailed calculations.

Description Text[30]

Descriptive name for the currency (e.g., "US Dollar", "Euro", "British Pound").

"Amount Decimal Places" Text[5]

Format specification for displaying amounts in this currency. Defines minimum and maximum decimal places (e.g., "2:2" for exactly 2 decimal places).

"Unit-Amount Decimal Places" Text[5]

Format specification for displaying unit amounts (prices, rates) in this currency. Typically allows more decimal places than regular amounts for precise calculations.

"Customer Filter" Code[20]

Flow filter to restrict calculations to a specific customer. Used with calculated fields to show customer-specific currency balances.

"Vendor Filter" Code[20]

Flow filter to restrict calculations to a specific vendor. Used with calculated fields to show vendor-specific currency balances.

"Global Dimension 1 Filter" Code[20]

Flow filter to restrict calculations to a specific global dimension 1 value. Used with calculated fields for dimensional analysis of currency balances.

"Global Dimension 2 Filter" Code[20]

Flow filter to restrict calculations to a specific global dimension 2 value. Used with calculated fields for dimensional analysis of currency balances.

"Date Filter" Date

Flow filter to restrict calculations to a specific date or date range. Used with calculated fields to show currency balances as of specific dates.

"Cust. Ledg. Entries in Filter" Boolean

Calculated field indicating whether customer ledger entries exist matching the current filters. Used to determine if customer balance calculations will return meaningful results.

"Customer Balance" Decimal

Calculated customer balance in this currency based on detailed customer ledger entries. Amount is filtered by Customer Filter, dimension filters, and date filter settings.

"Customer Outstanding Orders" Decimal

Calculated total of outstanding customer orders in this currency. Shows the sum of undelivered sales order amounts for the filtered customer.

"Customer Shipped Not Invoiced" Decimal

Calculated total of shipped but not yet invoiced customer orders in this currency. Shows the sum of goods delivered but not yet billed to the customer.

"Customer Balance Due" Decimal

Calculated customer balance due in this currency based on due dates. Shows amounts that are due for payment as of the specified date filter.

"Vendor Ledg. Entries in Filter" Boolean

Calculated field indicating whether vendor ledger entries exist matching the current filters. Used to determine if vendor balance calculations will return meaningful results.

"Vendor Balance" Decimal

Calculated vendor balance in this currency based on detailed vendor ledger entries. Amount is filtered by Vendor Filter, dimension filters, and date filter settings. Note: Amount is negated to show payable amounts as positive values.

"Vendor Outstanding Orders" Decimal

Calculated total of outstanding vendor orders in this currency. Shows the sum of unreceived purchase order amounts for the filtered vendor.

"Vendor Amt. Rcd. Not Invoiced" Decimal

Calculated total of received but not yet invoiced vendor orders in this currency. Shows the sum of goods received but not yet billed by the vendor.

"Vendor Balance Due" Decimal

Calculated vendor balance due in this currency based on due dates. Shows amounts that are due for payment as of the specified date filter. Note: Amount is negated to show payable amounts as positive values.

"Customer Balance (LCY)" Decimal

Calculated customer balance in Local Currency (LCY) equivalent. Shows the same balance as Customer Balance but converted to local currency amounts.

"Vendor Balance (LCY)" Decimal

Calculated vendor balance in Local Currency (LCY) equivalent. Shows the same balance as Vendor Balance but converted to local currency amounts. Note: Amount is negated to show payable amounts as positive values.

"Realized G/L Gains Account" Code[20]

General Ledger account for posting realized currency gains on GL transactions. Used specifically for GL account postings as opposed to customer/vendor transactions.

"Realized G/L Losses Account" Code[20]

General Ledger account for posting realized currency losses on GL transactions. Used specifically for GL account postings as opposed to customer/vendor transactions.

"Appln. Rounding Precision" Decimal

Precision used for rounding amounts during payment application processes. Determines the tolerance allowed when applying payments to invoices in this currency.

"EMU Currency" Boolean

Indicates whether this currency is part of the European Monetary Union (EMU). Used for special handling of Euro-related currencies and conversion logic.

"Currency Factor" Decimal

System-calculated factor used in currency conversion calculations. This field is automatically maintained and should not be manually edited.

"Residual Gains Account" Code[20]

General Ledger account for posting residual currency gains. Used for small rounding differences that occur during currency conversions.

"Residual Losses Account" Code[20]

General Ledger account for posting residual currency losses. Used for small rounding differences that occur during currency conversions.

"Conv. LCY Rndg. Debit Acc." Code[20]

General Ledger account for posting debit rounding differences during LCY conversion. Used when converting foreign currency amounts to local currency creates rounding differences.

"Conv. LCY Rndg. Credit Acc." Code[20]

General Ledger account for posting credit rounding differences during LCY conversion. Used when converting foreign currency amounts to local currency creates rounding differences.

"Max. VAT Difference Allowed" Decimal

Maximum VAT difference amount allowed for transactions in this currency. Defines the tolerance for VAT calculation discrepancies during currency conversions. The amount is automatically rounded to the currency's Amount Rounding Precision.

"VAT Rounding Type" Option

Method used for rounding VAT amounts in this currency. Options: Nearest (standard rounding), Up (always round up), Down (always round down).

"Payment Tolerance %" Decimal

Payment tolerance percentage allowed for this currency. This field is automatically maintained by the system and cannot be edited directly.

"Max. Payment Tolerance Amount" Decimal

Maximum payment tolerance amount allowed for this currency. This field is automatically maintained by the system and cannot be edited directly.

Symbol Text[10]

Display symbol for the currency (e.g., $, €, £). If not specified, the system will attempt to resolve an appropriate symbol automatically.

"Last Modified Date Time" DateTime

Timestamp of when the currency record was last modified. This field is automatically maintained by the system.

"Currency Symbol Position" Enum Microsoft.Finance.Currency."Currency Symbol Position"

Specifies the position of the currency symbol in relation to the amount.

"Coupled to CRM" Boolean
"Coupled to Dataverse" Boolean

Calculated field indicating whether this currency record is coupled to Microsoft Dataverse. Used for integration scenarios where currency data is synchronized between systems.

SystemId Guid
SystemCreatedAt DateTime
SystemCreatedBy Guid
SystemModifiedAt DateTime
SystemModifiedBy Guid
SystemRowVersion BigInteger

Methods

InitRoundingPrecision

Initializes currency rounding precision fields with values from General Ledger Setup. Sets default values for Amount Rounding Precision, Unit-Amount Rounding Precision, Invoice Rounding settings, VAT settings, and raises the OnAfterInitRoundingPrecision event.

procedure InitRoundingPrecision()

VATRoundingDirection

Returns the directional symbol for VAT rounding based on the VAT Rounding Type setting. Used in rounding calculations to determine rounding behavior.

procedure VATRoundingDirection(): Text[1]

Returns

Type Description
Text[1]

Text character: = for Nearest, > for Up, < for Down

InvoiceRoundingDirection

Returns the directional symbol for invoice rounding based on the Invoice Rounding Type setting. Used in invoice rounding calculations to determine rounding behavior.

procedure InvoiceRoundingDirection(): Text[1]

Returns

Type Description
Text[1]

Text character: = for Nearest, > for Up, < for Down

CheckAmountRoundingPrecision

Validates that required rounding precision fields are properly set. Ensures both Unit-Amount Rounding Precision and Amount Rounding Precision have values.

procedure CheckAmountRoundingPrecision()

GetGainLossAccount

Determines the appropriate G/L account for posting currency gain/loss based on entry type. Routes to specific account getter methods based on the type of gain/loss being processed. Raises OnBeforeGetGainLossAccount event for customization opportunities.

procedure GetGainLossAccount(DtldCVLedgEntryBuf: Record "Detailed CV Ledg. Entry Buffer"): Code[20]

Parameters

Name Type Description
DtldCVLedgEntryBuf Table Microsoft.Finance.ReceivablesPayables."Detailed CV Ledg. Entry Buffer"

Detailed CV ledger entry buffer containing entry type information

Returns

Type Description
Code[20]

G/L account code for posting the currency gain/loss

GetRealizedGainsAccount

Returns the G/L account for posting realized currency gains. Validates that the account is specified before returning it.

procedure GetRealizedGainsAccount(): Code[20]

Returns

Type Description
Code[20]

G/L account code for realized gains

GetRealizedLossesAccount

Returns the G/L account for posting realized currency losses. Validates that the account is specified before returning it.

procedure GetRealizedLossesAccount(): Code[20]

Returns

Type Description
Code[20]

G/L account code for realized losses

GetRealizedGLGainsAccount

Returns the G/L account for posting realized currency gains on G/L transactions. Validates that the account is specified before returning it.

procedure GetRealizedGLGainsAccount(): Code[20]

Returns

Type Description
Code[20]

G/L account code for realized G/L gains

GetRealizedGLLossesAccount

Returns the G/L account for posting realized currency losses on G/L transactions. Validates that the account is specified before returning it.

procedure GetRealizedGLLossesAccount(): Code[20]

Returns

Type Description
Code[20]

G/L account code for realized G/L losses

GetResidualGainsAccount

Returns the G/L account for posting residual currency gains. Validates that the account is specified before returning it.

procedure GetResidualGainsAccount(): Code[20]

Returns

Type Description
Code[20]

G/L account code for residual gains

GetResidualLossesAccount

Returns the G/L account for posting residual currency losses. Validates that the account is specified before returning it.

procedure GetResidualLossesAccount(): Code[20]

Returns

Type Description
Code[20]

G/L account code for residual losses

GetUnrealizedGainsAccount

Returns the G/L account for posting unrealized currency gains. Validates that the account is specified before returning it.

procedure GetUnrealizedGainsAccount(): Code[20]

Returns

Type Description
Code[20]

G/L account code for unrealized gains

GetUnrealizedLossesAccount

Returns the G/L account for posting unrealized currency losses. Validates that the account is specified before returning it.

procedure GetUnrealizedLossesAccount(): Code[20]

Returns

Type Description
Code[20]

G/L account code for unrealized losses

GetConvLCYRoundingDebitAccount

Returns the G/L account for posting debit rounding differences during LCY conversion. Validates that the account is specified before returning it.

procedure GetConvLCYRoundingDebitAccount(): Code[20]

Returns

Type Description
Code[20]

G/L account code for LCY conversion debit rounding

GetConvLCYRoundingCreditAccount

Returns the G/L account for posting credit rounding differences during LCY conversion. Validates that the account is specified before returning it.

procedure GetConvLCYRoundingCreditAccount(): Code[20]

Returns

Type Description
Code[20]

G/L account code for LCY conversion credit rounding

GetCurrencySymbol

Gets the display symbol for this currency, falling back to the currency code if no symbol is defined.

procedure GetCurrencySymbol(): Text[10]

Returns

Type Description
Text[10]

Currency symbol or currency code if symbol is not specified

ResolveCurrencySymbol

Resolves an appropriate display symbol for a given currency code. First checks if the currency record has a custom symbol, then falls back to built-in symbol mappings for common currencies. Raises OnBeforeResolveCurrencySymbol event for customization.

procedure ResolveCurrencySymbol(CurrencyCode: Code[10]): Text[10]

Parameters

Name Type Description
CurrencyCode Code[10]

The currency code to resolve a symbol for

Returns

Type Description
Text[10]

Currency symbol or empty string if no mapping is found

ResolveCurrencyDescription

Resolves a descriptive name for a given currency code. First checks if the currency record has a custom description, then falls back to built-in description mappings for common currencies.

procedure ResolveCurrencyDescription(CurrencyCode: Code[10]): Text

Parameters

Name Type Description
CurrencyCode Code[10]

The currency code to resolve a description for

Returns

Type Description
Text

Currency description or empty string if no mapping is found

ResolveGLCurrencySymbol

Resolves the currency symbol for use in General Ledger contexts. If a currency code is provided, resolves its symbol. If empty, returns the LCY symbol from GL Setup.

procedure ResolveGLCurrencySymbol(CurrencyCode: Code[10]): Text[10]

Parameters

Name Type Description
CurrencyCode Code[10]

The currency code to resolve, or empty for LCY

Returns

Type Description
Text[10]

Currency symbol for the specified currency or LCY symbol

Initialize

Initializes the currency record by loading it if a currency code is provided. If no currency code is provided, initializes rounding precision from GL Setup. This is an overload that calls the full Initialize method with CheckAmountRoundingPrecision set to false.

procedure Initialize(CurrencyCode: Code[10])

Parameters

Name Type Description
CurrencyCode Code[10]

Currency code to initialize, or empty for LCY initialization

Initialize

Initializes the currency record by loading it if a currency code is provided. If no currency code is provided, initializes rounding precision from GL Setup. Optionally validates that Amount Rounding Precision is properly set.

procedure Initialize(CurrencyCode: Code[10], CheckAmountRoundingPrecision: Boolean)

Parameters

Name Type Description
CurrencyCode Code[10]

Currency code to initialize, or empty for LCY initialization

CheckAmountRoundingPrecision Boolean

Whether to validate Amount Rounding Precision field

SuggestSetupAccounts

Suggests appropriate G/L accounts for currency posting based on existing currency setups. Analyzes other currency records to suggest commonly used accounts for gain/loss posting. Shows a message if no suggestions can be made.

procedure SuggestSetupAccounts()

CheckDuplicateCurrencySymbol

procedure CheckDuplicateCurrencySymbol(CurrencySymbol: Text[10])

Parameters

Name Type Description
CurrencySymbol Text[10]

Events

OnAfterInitRoundingPrecision

Integration event raised after initializing currency rounding precision settings. Allows customization of rounding precision initialization logic.

[IntegrationEvent(False,False)]
local procedure OnAfterInitRoundingPrecision(var Currency: Record Currency, var xCurrency: Record Currency, var GeneralLedgerSetup: Record "General Ledger Setup")

Parameters

Name Type Description
Currency Table Microsoft.Finance.Currency.Currency

Current currency record being initialized

xCurrency Table Microsoft.Finance.Currency.Currency

Previous version of the currency record

GeneralLedgerSetup Table Microsoft.Finance.GeneralLedger.Setup."General Ledger Setup"

General Ledger Setup record used for default values

OnBeforeGetGainLossAccount

Integration event raised before determining the gain/loss account for currency transactions. Allows customization of account determination logic.

[IntegrationEvent(False,False)]
local procedure OnBeforeGetGainLossAccount(var Currency: Record Currency, DtldCVLedgEntryBuffer: Record "Detailed CV Ledg. Entry Buffer")

Parameters

Name Type Description
Currency Table Microsoft.Finance.Currency.Currency

Current currency record

DtldCVLedgEntryBuffer Table Microsoft.Finance.ReceivablesPayables."Detailed CV Ledg. Entry Buffer"

Detailed CV ledger entry buffer containing transaction details

OnBeforeResolveCurrencySymbol

Integration event raised before resolving a currency symbol. Allows customization of currency symbol resolution logic.

[IntegrationEvent(False,False)]
local procedure OnBeforeResolveCurrencySymbol(var Currency: Record Currency, var CurrencyCode: Code[10])

Parameters

Name Type Description
Currency Table Microsoft.Finance.Currency.Currency

Current currency record

CurrencyCode Code[10]

Currency code being resolved

OnGetGainLossAccountOnOtherEntryType

Integration event raised when determining gain/loss account for entry types not handled by default logic. Allows handling of custom entry types for currency gain/loss posting.

[IntegrationEvent(False,False)]
local procedure OnGetGainLossAccountOnOtherEntryType(var Currency: Record Currency, DtldCVLedgEntryBuffer: Record "Detailed CV Ledg. Entry Buffer", var IsHandled: Boolean, var ReturnValue: Code[20])

Parameters

Name Type Description
Currency Table Microsoft.Finance.Currency.Currency

Current currency record

DtldCVLedgEntryBuffer Table Microsoft.Finance.ReceivablesPayables."Detailed CV Ledg. Entry Buffer"

Detailed CV ledger entry buffer containing transaction details

IsHandled Boolean

Set to true if the custom logic handles the entry type

ReturnValue Code[20]

G/L account code to use for posting

See also