With the release of Business Central AL version 15.2, Microsoft has introduced an important enhancement to the AL programming language: the ability to deprecate ExternalBusinessEvent type events. This update brings greater flexibility and control to developers managing event lifecycles, particularly in scenarios involving external integrations.
Understanding External Business Events
External business events are designed to allow external systems to subscribe to specific activities within Business Central. These events play a key role in enabling loosely coupled integrations and event-driven architectures.
Until now, once an external event was published, it remained active indefinitely. The new feature in version 15.2 changes that by allowing developers to formally mark these events as obsolete and guide subscribers toward newer versions.
The Deprecation Process
The process for deprecating an external business event follows the standard obsoletion pattern used for procedures, with one additional requirement: the event’s display name must be explicitly marked as obsolete.
Step 1: Mark the Event as Obsolete Pending
To begin the deprecation process, decorate the event procedure with the [Obsolete] attribute and prefix the DisplayName in the ExternalBusinessEvent attribute with [OBSOLETE].
[ExternalBusinessEvent('MyEvent', '[OBSOLETE] MyEventDisplayName', 'Description', EventCategory::MyValue, '1.0')]
[Obsolete('The event will be replaced by version 2.0 of MyEvent', '27.0')]
procedure MyEvent()
begin
end;
Step 2: Introduce a Replacement Event
In a future version, introduce a new event with an updated version number and a clean display name.
[ExternalBusinessEvent('MyEvent', 'MyEventDisplayName', 'Description', EventCategory::MyValue, '2.0')]
procedure MyEvent2()
begin
end;
Additional Considerations
It is worth noting that external business events are identified by a triplet: (App ID – Event Name – Event Version). This means that the event’s identity is independent of the object or procedure in which it resides. As a result, developers may obsolete the containing object without affecting the external event itself, provided the event is relocated within the same app and the standard obsoletion process is followed.
Why This Matters
This enhancement provides several benefits:
- Improved versioning and lifecycle management
- Clearer upgrade paths for external subscribers.
- Better governance over event-driven integrations.
For developers and ISVs, this change supports more sustainable and maintainable extension development, especially in environments where external systems rely on Business Central events.
Conclusion
The ability to deprecate external business events is a welcome addition to the AL language. It reflects Microsoft’s ongoing commitment to providing developers with the tools needed to build robust, future-proof solutions.
If you’re maintaining integrations or publishing events for external consumption, this feature is worth exploring. It offers a structured approach to evolving your event architecture while maintaining compatibility and clarity for subscribers.
Subscribe to our email newsletter to get the latest posts delivered right to your email.


Comments