In Visual Studio Code, there are two ways to create objects: 1) by using snippets, and 2) by using wizards. If you are trying to create objects in AL Language using a wizard, here you can get detailed steps.
1. In AL (application language), to create objects using the wizard, you need to install the “AZ AL Dev Tools/AL Code Outline” extension in Visual Studio Code, which is highlighted below:
2. Click on the Explorer icon, which is highlighted below, and then right-click in the Explorer tab. After that, select the “New AL File Wizard(AZ AL Dev Tools) option from the list, as shown in the attached image:
3. After that, select the object you want to create. For the demo, let’s take Table as an object from the list of wizard types.
4. Now, the window regarding the table information will be open. Now, the user needs to fill in information regarding the table as shown below. For eg.
- Object Id: The object ID will be filled out automatically; if the user wants to change it, it can be easily changed.
- Object Name: mention table name
- Data Classification: Mention the data classification type from the dropdown. By default, it will be “ToBeClassified.”.
5. Now, enter the information regarding the table’s fields:
- PK: PK defines the primary keys to a table. Select the field that needs to be set as a PK.
- ID: The ID defines the field’s ID.
- Data Type: Enter the data type according to the field.
- Length: Define the length of data until the user can enter in the field data.
- Data Classification: Specify the data classification according to the requirement.
6. Note: To get available options from the “Data Type” and “Data Classification” columns, click (Ctrl+Space), and then the list of available options will be easily visible to select, as shown below:
7. After entering all the information, click on “Finish.” Now, the table has been created as shown below: