Why do you need this change?
Problem statement
We need to replace the standard report 86 "Adjust Add. Reporting Currency" with a custom report that contains customer-specific functionality.
When validating the field "Additional Reporting Currency" in table "General Ledger Setup", the standard validation logic directly executes report 86.
Currently there is no event or other extensibility point that allows partners to substitute the report being executed or provide an alternative implementation.
As a result, the only available option is to replace the entire field from table and page outside the standard application, which is not maintainable.
Describe the request
Requested extensibility
Provide a way to substitute the report executed during the validation of the "Additional Reporting Currency" field.
One possible implementation would be an IntegrationEvent using the IsHandled pattern at the beginning of the OnValidate trigger.
Other extensibility mechanisms that allow replacing report 86 without duplicating the standard validation logic would also satisfy this requirement.
Proposed code snippet
A possible solution would be to add an integration event at the beginning of the OnValidate trigger of the "Additional Reporting Currency" field in the "General Ledger Setup" table using the IsHandled pattern.
This would enable partners to replace the standard validation flow with their own implementation. Our custom implementation would follow the same logic as the standard code, but would execute a custom report instead of report 86.
field(68; "Additional Reporting Currency"; Code[10])
{
…
trigger OnValidate()
var
**IsHandled: Boolean; //new code**
begin
//new code
OnValidateAdditionalReportingCurrency("Additional Reporting Currency", xRec."Additional Reporting Currency", IsHandled);
**if IsHandled then
exit;**
//new code
if ("Additional Reporting Currency" <> xRec."Additional Reporting Currency") and
("Additional Reporting Currency" <> '')
then begin
AdjAddReportingCurr.SetAddCurr("Additional Reporting Currency");
AdjAddReportingCurr.RunModal();
if not AdjAddReportingCurr.IsExecuted() then
"Additional Reporting Currency" := xRec."Additional Reporting Currency";
end;
if ("Additional Reporting Currency" <> xRec."Additional Reporting Currency") and
("Additional Reporting Currency" <> '') and
AdjAddReportingCurr.IsExecuted()
then
DeleteAnalysisView();
end;
}
[IntegrationEvent(false, false)]
local procedure OnValidateAdditionalReportingCurrency(var AdditionalReportingCurrency: Code[10]; xRecAdditionalReportingCurrency: Code[10]; var IsHandled: Boolean)
begin
end;
Alternatives evaluated
This will not change the default behavior we need only to replace the 86 report with a custom report.
Justification for using IsHandled over alternatives
The standard implementation executes report 86 directly from the OnValidate trigger without providing any extensibility point to substitute the report.
Because the report execution is embedded inside the validation logic, partners currently have no supported way to replace report 86 while preserving the existing validation flow.
The only alternative is to replace the entire field on both the table and the page and maintain a copy of the Microsoft code, which introduces upgrade and maintenance risks.
An IsHandled event at the beginning of the trigger would provide a supported extensibility mechanism for scenarios where a custom implementation of the report is required.
Performance considerations
Τhis changes introduces no loops, database access, or locking.
Data sensitivity review
No sensitive or personal data is exposed.
Multi-extension interaction
The proposed IsHandled pattern aligns with established extensibility practices in Business Central and follows a commonly used design approach for enabling partners to override standard behavior.
In scenarios where multiple extensions subscribe to the OnValidateAdditionalReportingCurrency event, the expected pattern is that a single subscriber takes ownership of the flow by setting IsHandled := true. This is consistent with how similar events are designed and used across the base application.
Potential considerations:
If more than one extension attempts to handle the event and sets IsHandled := true, the effective behavior may depend on subscriber execution order.
As with other IsHandled-based events, this introduces a level of coordination responsibility among extensions targeting the same functionality.
Mitigating factors:
The specific scenario (replacing the adjustment process of Additional Reporting Currency) represents a specialized accounting customization, which is typically implemented by a single solution within a given environment.
Therefore, the likelihood of multiple independent extensions competing for the same override is expected to be low.
This request does not introduce new extensibility patterns or risks beyond those already present and accepted in the platform.
Coordination approach:
Extensions subscribing to this event are expected to implement appropriate safeguards (such as conditional logic, setup-driven behavior, or integration agreements) to avoid unintended overrides.
This is consistent with standard partner responsibility for handling IsHandled events in a controlled and predictable manner.
Internal work item: AB#640858
Why do you need this change?
Problem statement
We need to replace the standard report 86 "Adjust Add. Reporting Currency" with a custom report that contains customer-specific functionality.
When validating the field "Additional Reporting Currency" in table "General Ledger Setup", the standard validation logic directly executes report 86.
Currently there is no event or other extensibility point that allows partners to substitute the report being executed or provide an alternative implementation.
As a result, the only available option is to replace the entire field from table and page outside the standard application, which is not maintainable.
Describe the request
Requested extensibility
Provide a way to substitute the report executed during the validation of the "Additional Reporting Currency" field.
One possible implementation would be an IntegrationEvent using the IsHandled pattern at the beginning of the OnValidate trigger.
Other extensibility mechanisms that allow replacing report 86 without duplicating the standard validation logic would also satisfy this requirement.
Proposed code snippet
A possible solution would be to add an integration event at the beginning of the OnValidate trigger of the "Additional Reporting Currency" field in the "General Ledger Setup" table using the IsHandled pattern.
This would enable partners to replace the standard validation flow with their own implementation. Our custom implementation would follow the same logic as the standard code, but would execute a custom report instead of report 86.
Alternatives evaluated
This will not change the default behavior we need only to replace the 86 report with a custom report.
Justification for using IsHandled over alternatives
The standard implementation executes report 86 directly from the OnValidate trigger without providing any extensibility point to substitute the report.
Because the report execution is embedded inside the validation logic, partners currently have no supported way to replace report 86 while preserving the existing validation flow.
The only alternative is to replace the entire field on both the table and the page and maintain a copy of the Microsoft code, which introduces upgrade and maintenance risks.
An IsHandled event at the beginning of the trigger would provide a supported extensibility mechanism for scenarios where a custom implementation of the report is required.
Performance considerations
Τhis changes introduces no loops, database access, or locking.
Data sensitivity review
No sensitive or personal data is exposed.
Multi-extension interaction
The proposed IsHandled pattern aligns with established extensibility practices in Business Central and follows a commonly used design approach for enabling partners to override standard behavior.
In scenarios where multiple extensions subscribe to the OnValidateAdditionalReportingCurrency event, the expected pattern is that a single subscriber takes ownership of the flow by setting IsHandled := true. This is consistent with how similar events are designed and used across the base application.
Potential considerations:
If more than one extension attempts to handle the event and sets IsHandled := true, the effective behavior may depend on subscriber execution order.
As with other IsHandled-based events, this introduces a level of coordination responsibility among extensions targeting the same functionality.
Mitigating factors:
The specific scenario (replacing the adjustment process of Additional Reporting Currency) represents a specialized accounting customization, which is typically implemented by a single solution within a given environment.
Therefore, the likelihood of multiple independent extensions competing for the same override is expected to be low.
This request does not introduce new extensibility patterns or risks beyond those already present and accepted in the platform.
Coordination approach:
Extensions subscribing to this event are expected to implement appropriate safeguards (such as conditional logic, setup-driven behavior, or integration agreements) to avoid unintended overrides.
This is consistent with standard partner responsibility for handling IsHandled events in a controlled and predictable manner.
Internal work item: AB#640858