BC: how to see the code of a codeunit

TMNielsen
Member Posts: 3
I'm new to Mibuso, so I'm confused why we put BC discussions in NAV Three Tier, but everyone else does, so I will give it a try :-)
I'm also new to BC developement. I have with VS Code AL created a few test extensions from tutorials, but now I have a real task. I have a process in BC that has looong runtime and it creates database locks. In the Database logs overview I can see that the locks are created by codeunit 1639 and I would like to see the code of this codeunit.
How can I do this?
I'm also new to BC developement. I have with VS Code AL created a few test extensions from tutorials, but now I have a real task. I have a process in BC that has looong runtime and it creates database locks. In the Database logs overview I can see that the locks are created by codeunit 1639 and I would like to see the code of this codeunit.
How can I do this?
0
Best Answers
-
HI @TMNielsen
You can also extract the source code from your .alpackages in VSCode by opening any of the app file with a ZIP tool (like WinRAR of 7Zip) and view the AL files there.
For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.1 -
HI TMNielsen,
Personally when I need to search throw the AL file I use a tool called GrepWin (https://tools.stefankueng.com/grepWin.html)
There you can search for "codeunit 1639" and it will show the file with that text :-)For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.1
Answers
-
Hello TMNielsen,
You could install an extension in VSCode: AZ AL Dev Tools. With this tool you get a table with the standard objects. (like in old development environment). The tool has other verry usefull features.
Option 2: is to unpack some where the source files installed on de installation DVD.
Good luck.
Greetings,
Carolien1 -
Thanks, I will have a look at AZ AL Dev Tools.
I'm running BC Saas, so installation DVD is not available.0 -
HI @TMNielsen
You can also extract the source code from your .alpackages in VSCode by opening any of the app file with a ZIP tool (like WinRAR of 7Zip) and view the AL files there.
For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.1 -
The base AL code is on the product DVD under the "Applications" folder.There are no bugs - only undocumented features.0
-
HI @TMNielsen
You can also extract the source code from your .alpackages in VSCode by opening any of the app file with a ZIP tool (like WinRAR of 7Zip) and view the AL files there.
Hi SanderDk
This looks promising, but the .aplackages contains 4 .app files with a lot of folders with src code. The .al files are named and not numbered, so I can only see the codeunit number if I open the files.
Do you have a suggestion how I can search the .al source codes in these .app files to find a specific codeunit no. like 1639?0 -
HI TMNielsen,
Personally when I need to search throw the AL file I use a tool called GrepWin (https://tools.stefankueng.com/grepWin.html)
There you can search for "codeunit 1639" and it will show the file with that text :-)For help, do not use PM, use forum instead, perhaps other people have the same question, or better answers.1
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions