Security change on December 1, 2026: TLS 1.2 will become the minimum standard for 365 business Print Agent. Details and system requirements
365 business development
365 business Address Validation

Extensibility Events

365 business Address Validation publishes one event another extension can subscribe to.

It decides whether address prediction runs for a table the app does not know about itself.

CodeunitEventRaised
bdev.Address Prediction API (5523621)OnIsAddressPredictionEnabledForTableNoWhen a page activates the prediction control for a table the app does not support itself.

Why there is only one

The app publishes further events, but they sit on codeunits marked Access = Internal and cannot be reached from another extension. What they offer is available in a supported form elsewhere: to validate a record of your own, call the Address Validation API rather than waiting for the app to come to you.

OnIsAddressPredictionEnabledForTableNo - Event

The event is raised for every table except the ones the app supports itself - Contact, Customer, Vendor, Employee, Resource, Sales Header and Ship-to Address, each of which has its own switch in Address Validation Setup. Subscribe to it to switch the type-ahead on for a table of your own.

It is only reached when address prediction is enabled in the setup at all and the feature is licensed. A subscriber answering true therefore enables the prediction for your table, but does not turn the feature on.

Code
/// <summary> /// The event is executed for every table that is not supported by the /// Address Validation app itself. Use this to enable execution for your own tables. /// </summary> /// <param name="tableNo">Table No.</param> /// <param name="enabled">Specifies whether to enable Address Prediction or not.</param> [IntegrationEvent(false, false)] local procedure OnIsAddressPredictionEnabledForTableNo(tableNo: Integer; var enabled: Boolean) begin end;
ParameterTypeDescription
tableNoIntegerThe table id the page passed to OnControlAddInReady.
enabledBooleanSet to true to run the prediction for this table.

Example

Code
codeunit 50000 "My Address Prediction Subscriber" { [EventSubscriber(ObjectType::Codeunit, Codeunit::"bdev.Address Prediction API", 'OnIsAddressPredictionEnabledForTableNo', '', true, true)] local procedure EnableBrokerOnIsAddressPredictionEnabledForTableNo(tableNo: Integer; var enabled: Boolean) begin if (tableNo = Database::Broker) then enabled := true; end; }

Only ever switch it on

Several extensions can subscribe to this event, and they see each other's answer. Set enabled := true for the tables that are yours, and leave the parameter alone for every other table id - enabled := (tableNo = Database::Broker) would switch off the prediction another extension had just enabled.

Without a subscriber that answers true, the prediction control on a page of your own loads but never offers a suggestion. That is the usual explanation for a type-ahead that stays silent.

See also

Last modified on