The AL Code Cleanup extension for Visual Studio Code is a powerful tool for cleaning up and formatting AL (Dynamics 365 Business Central) code. It provides various features to help developers maintain a consistent and clean codebase.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
The AL Code Cleanup extension for Visual Studio Code is a powerful tool for cleaning up and formatting AL (Dynamics 365 Business Central) code. It provides various features to help developers maintain a consistent and clean codebase specifically after converting Objects from C/AL to AL.
Features
Remove Double Quotes from Object IDs: Automatically removes unnecessary double quotes from AL object IDs.
Clean Dataitem Table IDs: Removes the word "Table" from dataitem declarations to simplify convert object id.
Clean AL Built-In Functions: Converts AL built-in function names to modern camelCase format. For example, it changes "SETRANGE" to "SetRange" in AL Language, making the code more readable and aligned with modern AL coding practices.
Installation
Open Visual Studio Code.
Go to the Extensions view by clicking on the square icon in the sidebar on the left or by pressing Ctrl+Shift+X.
Search for "AL Code Cleanup" in the Extensions view search bar.
Click the "Install" button for the AL Code Cleanup extension.
Usage
Open an AL code file in Visual Studio Code.
Use the provided commands:
AL Code Cleanup: Remove Double Quotes from Object IDs in the Active Editor
AL Code Cleanup: Clean Dataitem Table IDs in the Active Editor
AL Code Cleanup: Clean AL Built-In Functions in the Active Editor
The extension will automatically clean up your code based on the selected command.
Contributing
If you have suggestions, issues, or want to contribute to this extension, please visit the GitHub repository for this project.