Events
Overview
Admin Hub uses extensibility through interfaces rather than traditional Business Central events. This design provides stronger typing and better compile-time validation for plugin developers.
Why Interfaces Instead of Events?
The Admin Hub architecture uses interface-based extensibility because:
- Type Safety - Interface implementations are validated at compile time
- Discoverability - Developers can easily find required methods through IntelliSense
- Contract Enforcement - All implementations must provide all interface methods
- Better Performance - Direct method calls instead of event subscriptions
Extensibility Points
Instead of subscribing to events, plugins extend Admin Hub by:
1. Implementing Connection Clients
enumextension 70254400 "MyConnectionType" extends "ConnectionType_TSL"
{
value(70254400; "MyService")
{
Implementation = IConnectionClient_TSL = MyServiceClient_TSL;
}
}
See IConnectionClient_TSL for details.
2. Implementing Source Providers
enumextension 70254401 "MySourceProvider" extends "SourceProvider_TSL"
{
value(70254401; "CustomSource")
{
Implementation = ISourceProvider_TSL = MySourceProvider_TSL;
}
}
See ISourceProvider_TSL for details.
3. Extending Entities
All main entities are marked as Extensible = true, allowing plugins to add custom fields:
tableextension 70254400 "MyTenantExt" extends "Tenant_TSL"
{
fields
{
field(70254400; "MyCustomField"; Text[100])
{
DataClassification = CustomerContent;
}
}
}
4. Extending Pages
Pages can be extended to add custom actions and fields:
pageextension 70254400 "MyTenantListExt" extends "TenantList_TSL"
{
actions
{
addlast(processing)
{
action(MyCustomAction)
{
Caption = 'My Custom Action';
trigger OnAction()
begin
// Custom logic
end;
}
}
}
}
Future Event Possibilities
If you need traditional events for specific scenarios, please submit a feature request. Potential candidates:
OnBeforeTenantInsert/OnAfterTenantInsertOnBeforeRequestExecute/OnAfterRequestExecuteOnBeforeAppVersionImport/OnAfterAppVersionImport
Related Documentation
- Interfaces - Interface definitions and implementation patterns
- Entities - Extensible entity documentation
- Design - Architecture and extensibility overview