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

Announcements

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,172 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
    17,006 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
    101,995 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
    22,792 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,314 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,781 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,356

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans