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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

How to find codeunits ?

(4) ShareShare
ReportReport
Posted on by 487

Hello Everyone,

I am trying to add custom code to the existing "adjust item costs/prices" using events. However, I would like to see what code is run by that module. How can I find it please?

Cheers

I have the same question (0)
  • Suggested answer
    Hedi Daneels Profile Picture
    487 on at

    I found it here:

    report 794 "Adjust Item Costs/Prices"

    To find it, I made a fake link with  RunObject = , and then page, codeunit, report, to find the right code.

    Is there any other way to do this?

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

    Yes, using Page Inspector or Event Recorder.

  • TR-12091449-0 Profile Picture
    108 on at
    Is Page Inspector really able to provide the CodeUnit?
  • Suggested answer
    Jainam M. Kothari Profile Picture
    15,647 Super User 2025 Season 2 on at
    Hello,
     
    To view the code for the "Adjust Item Costs/Prices" module in Business Central, open the AL development environment in Visual Studio Code and download the base application source code from Microsoft's GitHub repository. Search for the relevant code units, such as Codeunit 5895 - Inventory Adjustment. Use events and event subscribers to add custom code without modifying the base code directly. You can also use debugging tools in Visual Studio Code to step through the code and understand its execution. For detailed guidance, refer to the official Microsoft documentation on adjusting item costs and tracking inventory costs.
  • Suggested answer
    YUN ZHU Profile Picture
    96,256 Super User 2025 Season 2 on at
    No. Page Inspector is only applicable to functions that can be displayed on the screen, such as Page, Report, Query, XMLPort.
    Codeunit cannot be opened directly, so all unsupported
     
    Thanks.
    ZHU
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    21,181 Super User 2025 Season 2 on at
    Since codeunits are not visible via Page Inspector, you’ll need to search the AL source or Base App for the action name or use tools like AL Object Designer or VS Code to locate the relevant logic.

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

News and Announcements

Season of Giving Solutions is Here!

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,703

#2
YUN ZHU Profile Picture

YUN ZHU 803 Super User 2025 Season 2

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 750 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans