How to find all references (or occurrences) of a certain field in the code of an .app

IvanGarciaSubero
Member Posts: 6
I'm working with the .app LS Retail, it's open source (but readonly) so I can click in the .app file in Visual Studio Code and navigate through all its code files (tables, extensions, codeunits...).
Let's say I'm working with a certain field of a table extension, and I need to know how this file is used in the .app, so I'd like to find all references of this field in the code of the whole .app. This task is easily done in other IDEs like Eclipse or Visual Studio or , but I can't find a way to get it with Visual Studio Code.
Here is an example, I need to find all references to the field "LSC Explode BOM in Statement Post", there may be about 10 references or less in the code of the .app. It would also help me if I can't search by text (not through hard code references) if it is possible

Or maybe a way for opening all files of an .app and find text in all opened files? It sounds heavy, but I don't care if the search takes hours to finish, it's better than manually search
Thanks
Let's say I'm working with a certain field of a table extension, and I need to know how this file is used in the .app, so I'd like to find all references of this field in the code of the whole .app. This task is easily done in other IDEs like Eclipse or Visual Studio or , but I can't find a way to get it with Visual Studio Code.
Here is an example, I need to find all references to the field "LSC Explode BOM in Statement Post", there may be about 10 references or less in the code of the .app. It would also help me if I can't search by text (not through hard code references) if it is possible

Or maybe a way for opening all files of an .app and find text in all opened files? It sounds heavy, but I don't care if the search takes hours to finish, it's better than manually search

Thanks
0
Answers
-
The only way I can think of is to extract the objects into a 'dummy' workspace. Don't worry about compiler errors and object file names, that should work for references.
Also, take a look at the Statical Prism tool for AL, they may have something to make that easier https://stati-cal.com/1 -
@DenSter I'm taking a look to that tool, thanks a lot.
On the other hand, in a somewhat crude way it is possible to unzip the .package (i.e. with 7-zip), get all code files and then open it in your favorite IDE, and make any search by name. Steps to follow:
1. Unzip the package
2. You go to the folder C:/.../your_unzip_package_path/src/Base
3. In my case, I needed to replace '%2520' in file names by spaces by using this command in PowerShell: Get-ChildItem -Recurse | Rename-Item -NewName { $_.Name -replace '%2520',' ' }
4. Open the /Base folder i.e. with Visual Studio Code
5. Make any search by name in the whole project: Ctrl+Shift+F with any code file selected
I hope it helps0 -
[Topic moved from 'Design Patterns (General & Best Practices)' forum to 'NAV Tips & Tricks' forum]
Regards,Alain Krikilion
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!0
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