Renaming/reorganizing files

As mentioned earlier, this is the most widely used functionality of the tool:

  • Renaming is renaming the file.
  • Reorganizing is renaming the file AND placing it in a subfolder that matches its object type.

The essence is captured in four commands that are again available from the Visual Studio Code command palette:

  • CRS: Rename – Current File.
  • CRS: Rename – All Files.
  • CRS: Reorganize – Current File.
  • CRS: CRS: Reorganize – All Files—note that Reorganize will move a test codeunit to the test folder.

There's also a setting to start the file renaming/reorganizing automatically when saving a .al file:

"CRS.OnSaveAlFileAction": "Rename"

Another interesting functionality of rename/reorganize is the ability to ...

Get Mastering Microsoft Dynamics 365 Business Central now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.