web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Business Central forum

New Function added in standard codeunit, how to create an extension for this ?

(0) ShareShare
ReportReport
Posted on by 86

We have added a function in standard codeunit (ArchiveManagement) in dynamics nav 2018, now we are upgrading this to Business Central. Is there any way we can create extension for standard codeunit as it is available for tables.

Also there are some standard local function which we have used in our customized function. This customised function is being called on a page.

We have check the event & publisher, but as we have added a customised function in standard codeunit how we do this in business central.

Categories:
I have the same question (0)
  • Verified answer
    I Gusti Made Ari Profile Picture
    3,608 on at

    There is no extension for codeunit.

    You need to move the custom function to new custom codeunit or to convert your solution to event and if the event that you are looking for  is not there , you need to write request for it to microsoft using below repo link :

    github.com/.../issues

    if you are ok with hybrid development (working with CSIDE and AL)  , then another workaround is explained on below :

    docs.microsoft.com/.../devenv-running-cside-and-al-side-by-side

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,172 Most Valuable Professional on at

    You cannot "extend" a standard codeunit. You can create a new codeunit in AL and then define here your custom functions.

    If you're using some standard local function that are not defined as External, you have no way to use them in your extension from another object. You can recreate that functions in your custom codeunit (by copying the code) if you need them.

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.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Business Central

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans