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 :
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,721 Super User 2026 Season 1 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
    98,421 Super User 2026 Season 1 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,573 Super User 2026 Season 1 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

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,857 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,047 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 959 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans