Table "Curr. Exch. Rate Update Setup"
Manages configuration for automated currency exchange rate update services. Enables integration with third-party exchange rate providers for automatic daily updates.
Remarks
Integrates with Data Exchange Framework, Job Queue, and Customer Consent Management. Supports extensibility through OnBeforeSetupCurrencyExchRateService, OnAfterGetWebServiceURL, OnBeforeAutoUpdateExchangeRates, and OnBeforeEnsureURLIsHttpAndValidUri events.
Properties
| Name | Value |
|---|---|
| Caption | Curr. Exch. Rate Update Setup |
| DataCaptionFields | 1,2 |
| DataClassification | CustomerContent |
Fields
| Name | Type | Description |
|---|---|---|
| Code | Code[20] | Unique identifier for the currency exchange rate service configuration. Automatically creates a data exchange definition when entered. |
| Description | Text[250] | Human-readable description of the exchange rate service and its purpose. Used in user interfaces and job queue descriptions for service identification. |
| "Web Service URL" | Blob | Stores the complete web service URL for the exchange rate provider endpoint. BLOB storage protects URLs containing API keys or authentication parameters. |
| Enabled | Boolean | Controls whether automatic exchange rate updates are active for this service. Validates user consent, service configuration, and manages job queue scheduling. |
| "Service Provider" | Text[30] | Name of the external service provider supplying exchange rate data. Used for user identification and support contact purposes. |
| "Terms of Service" | Text[250] | URL to the service provider's terms of service or usage agreement. Enables users to review legal terms before service activation. |
| "Data Exch. Def Code" | Code[20] | Links to the Data Exchange Definition that defines how to parse and map service responses. Auto-created during setup but can be customized for specific service formats. |
| "Log Web Requests" | Boolean | Enables detailed logging of web service requests and responses for troubleshooting. Should be used temporarily for debugging service integration issues. |
| SystemId | Guid | |
| SystemCreatedAt | DateTime | |
| SystemCreatedBy | Guid | |
| SystemModifiedAt | DateTime | |
| SystemModifiedBy | Guid | |
| SystemRowVersion | BigInteger |
Methods
GetWebServiceURL
Retrieves the web service URL from BLOB storage with extensibility for URL transformation. Triggers OnAfterGetWebServiceURL event for custom URL modification.
procedure GetWebServiceURL(var ServiceURL: Text): Text
Parameters
| Name | Type | Description |
|---|---|---|
| ServiceURL | Text |
Output parameter containing the retrieved URL |
Returns
| Type | Description |
|---|---|
| Text |
The web service URL as stored in the BLOB field |
SetWebServiceURL
Validates and stores a web service URL in BLOB field after security validation. Ensures URLs meet HTTP/HTTPS protocol requirements.
procedure SetWebServiceURL(ServiceURL: Text)
Parameters
| Name | Type | Description |
|---|---|---|
| ServiceURL | Text |
The URL to validate and store |
CreateDataExchangeDefinition
Creates complete Data Exchange Definition setup for currency exchange rate import. Establishes Data Exchange Definition, Line Definition, and Field Mapping records.
procedure CreateDataExchangeDefinition(DataExchCode: Code[20])
Parameters
| Name | Type | Description |
|---|---|---|
| DataExchCode | Code[20] |
Unique code for the new data exchange definition |
VerifyDataExchangeLineDefinition
Validates that data exchange definition has proper XML node configuration. Ensures Data Line Tag is configured before enabling service.
procedure VerifyDataExchangeLineDefinition()
VerifyServiceURL
Validates that web service URL is configured before enabling service.
procedure VerifyServiceURL()
ShowJobQueueEntry
Opens Job Queue Entry card for monitoring scheduled currency updates. Supports extensibility through OnShowJobQueueEntryOnBeforeJobQueueEntryFindFirst event.
procedure ShowJobQueueEntry()
SetupService
Initializes exchange rate service configuration when no services exist. Runs setup codeunit with error handling and telemetry logging.
procedure SetupService()
Events
OnAfterGetWebServiceURL
Allows customization of web service URLs after retrieval from storage.
[IntegrationEvent(True,False)]
local procedure OnAfterGetWebServiceURL(var ServiceURL: Text)
Parameters
| Name | Type | Description |
|---|---|---|
| ServiceURL | Text |
The service URL that can be modified by subscribers |
OnBeforeSetupCurrencyExchRateService
Enables customization of currency exchange rate service setup process.
[IntegrationEvent(False,False)]
procedure OnBeforeSetupCurrencyExchRateService(var CurrExchRateUpdateSetup: Record "Curr. Exch. Rate Update Setup")
Parameters
| Name | Type | Description |
|---|---|---|
| CurrExchRateUpdateSetup | Table Microsoft.Finance.Currency."Curr. Exch. Rate Update Setup" |
The setup record that can be modified during setup |
OnBeforeEnsureURLIsHttpAndValidUri
Provides extensibility for custom URL validation logic before storing service URLs.
[IntegrationEvent(False,False)]
local procedure OnBeforeEnsureURLIsHttpAndValidUri(ServiceURL: Text, var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| ServiceURL | Text |
The URL being validated |
| IsHandled | Boolean |
Set to true to skip standard validation |
OnShowJobQueueEntryOnBeforeJobQueueEntryFindFirst
Allows customization of job queue entry lookup when displaying scheduling information.
[IntegrationEvent(False,False)]
local procedure OnShowJobQueueEntryOnBeforeJobQueueEntryFindFirst(var CurrExchRateUpdateSetup: Record "Curr. Exch. Rate Update Setup", var JobQueueEntry: Record "Job Queue Entry", var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| CurrExchRateUpdateSetup | Table Microsoft.Finance.Currency."Curr. Exch. Rate Update Setup" |
The setup record requesting job queue display |
| JobQueueEntry | Table System.Threading."Job Queue Entry" |
The job queue entry record that can be filtered or modified |
| IsHandled | Boolean |
Set to true to skip standard job queue entry lookup |
OnBeforeAutoUpdateExchangeRates
Enables customization of automatic exchange rate update scheduling and execution.
[IntegrationEvent(False,False)]
local procedure OnBeforeAutoUpdateExchangeRates(var CurrExchRateUpdateSetup: Record "Curr. Exch. Rate Update Setup", var IsHandled: Boolean)
Parameters
| Name | Type | Description |
|---|---|---|
| CurrExchRateUpdateSetup | Table Microsoft.Finance.Currency."Curr. Exch. Rate Update Setup" |
The setup record being processed for automatic updates |
| IsHandled | Boolean |
Set to true to skip standard job queue scheduling |