Please visit https://www.altoolbox.com/ for more in depth information and AL Language tips and tricks.
You can change the color in UserSettings
Automatic fix for AL(AA0139)
Every warning/information line will now show a CodeAction to surround with Pragma to ignore it. So that warnings that you can do nothing about can be ignored easily.
Some variants on the above Pragma CodeAction were added as well:
Surround ### with Pragma & add TODO tag (with comment)
Surround ### with Pragma (in all documents)
ALTB: Create regions for all AL functions and triggers | Running this command will generate Regions around all Functions that don't have regions yet.
ALTB: Create regions for all AL dataitems and columns | Running this command will generate Regions around all Dataitems and Columns in a report.
ALTB: Create regions for all AL functions, triggers, dataitems, and columns | Combination of the previous 2.
ALTB: Renumber AL Objects | This function will renumber your objects based on the number ranges in the App.json
ALTB: Renumber fields | Renumbers field numbers in the active editor
ALTB: Renumber all fields | Renumbers fields in all tables and table extensions objects (in all workspace folders).
ALTB: Change Object Prefix | This function will ask you what the new prefix should be and rename all your objects and the settings.json.
This will create a set of tableextensions that should have the same fields so that there is no issue when standard code issues a TransferFields().
# ALTB
.alpackages/
.alcache/
.altemplates/
.altestrunner/
*.json
!app.json
rad.json
*.app
*.g.xlf
ALTB: Generate SetLoadFields | Creates SetLoadFields or adds missing fields to SetLoadFields for a record.
Either //#Region or the default #Region can be used with this extension. The snippets/actions will adjust automatically according to the runtime you are using.
ALTB.UseOldFileNamingConventions | Boolean: default true
<ObjectPrefix>(<ExtenedObjectId>-Ext)?<ObjectId>.<ObjectNameExcludingPrefix>.al
instead of <ObjectNameExcludingPrefix>.<FullTypeName>(Ext)?.al
for file names.ALTB.PutCreatedRelatedObjectsInSeparateFolders | Boolean: default false
ALTB.AdditionalRelatedObjects | List: default []
ALTB.DisableAPIEntityWarnings | Boolean: default false
ALTB.UseAlRegions | Boolean: default true
ALTB.DisableCustomFolding | Boolean: default false
ALTB.RegionColor | Color: default #569CD6
~ blue
(//)?#(end)?region
). Set to ""
to disable coloring.ALTB.RegionTextColor | Color: default #D4D4D4
~ white
""
to disable coloring.ALTB.DisableHoverProviders | Boolean: default false
ALTB.CheckCommentTranslations | Boolean: default false
ALTB.SnippetTargetLanguage | String: default NLB
ALTB.SnippetTargetLanguage2 | String: default FRB
ALTB.TelemetryIdentifier | String: default External
ALTB.DisableSnippets
ALTB.UseSimpleFunctionSnippets
ALTB.SourceCodeFolderName
ALTB: Renumber AL Objects
pageextension 80021 "EXTCustomerCard" extends "Customer Card" //21
ALTB: Change Object Prefix
ALTB: Generate SetLoadFields
If there's a Get, Find, ... in a statement over multiple lines, the genered code can be incorrect. e.g:
if
RecVar.Get()
then
TestFunction(RecVar.TestField);
// Will genereate:
if
RecVar.SetLoadFields(TestField);
RecVar.Get()
then
TestFunction(RecVar.TestField);
To add additional related objects use the ALTB.AdditionalRelatedObjects setting.
Example format:
[
{ // For adding tableextensions
"folder": "SalesHeader", // subfolder of src where to place the objects when using "ALTB: Start Project: Create Related Tables"
"objectType": "tableextension",
"objects": [ // these tables will be considered related
{ "id": 36, "name": "Sales Header" },
{ "id": 110, "name": "Sales Shipment Header" },
{ "id": 112, "name": "Sales Invoice Header" },
{ "id": 114, "name": "Sales Cr.Memo Header" },
{ "id": 5107, "name": "Sales Header Archive" },
{ "id": 6660, "name": "Return Receipt Header" }
]
},
...
{ // For adding pageextensions
"table": "Contact", // source table of pageextension
"folder": "Contact", // subfolder of src where to place the objects when using "ALTB: Start Project: Create Related Tables"
"objectType": "pageextension",
"objects": [ // pages for the source table
{ "id": 5050, "name": "Contact Card" },
{ "id": 5052, "name": "Contact List" }
]
},
...
]
The default related objects can be found in src/constants.js in the AL-toolbox repository (search for RelatedObjects).
Special thanks to ESC BV for investing in this tool! https://esc.be/