Announcements
No record found.
Hello community,
I want to ask that if I want to extend codeunits in business central how can I do that as there is no code snippet for code unit extension.
We have to create subscribers based on the publishers available in the codeunits.
learn.microsoft.com/.../devenv-events-in-al
Do you have any set of code for example?
Hi Muhammad Anas Naeemi,
check the below link mohana Yadav already answered the question.
https://community.dynamics.com/nav/f/microsoft-dynamics-nav-forum/218269/modify-standard-codeunit-using-extensions/582548
For more detail please share the Codeunit ID and explain what you want to customize.
Hi, unfortunately, you cannot extend codeunit in Business Central.
But you can modify some default behaviors, as long as the standard reserves Event for us.
https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-events-in-al
Hope this helps.
Thanks.
ZHU
It is not possible in Business Central to extend a standard codeunit directly, as this can break the execution flow and is not supported by Microsoft.
The recommended approach is to use Event Subscribers. Microsoft exposes events in standard codeunits that allow you to run custom logic before or after standard processing without modifying the base code.
You can refer to this detailed explanation and example here: https://scrutnlearn.com/business-central-tutorial/how-to-extend-codeunits.html
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our 2026 Super Stars!
Thanks to all of our 2025 Community Spotlight stars!
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 1,964 Super User 2026 Season 1
Dhiren Nagar 1,086 Super User 2026 Season 1
YUN ZHU 1,039 Super User 2026 Season 1