Exercise - Create a table extension

Completed

Simon is a developer working for CRONUS International Ltd. Simon wants to create a solution to keep social media information for customers and needs to create a table extension to save social media information.

Tasks

  • Create a table extension with snippets.

  • Add extra fields to an existing table.

Steps

  1. Start Visual Studio Code.

  2. Select View > Extensions (Ctrl+Shift+X).

  3. Enter AL Language in the Search Extensions in the Marketplace search box.

  4. Select the green Install button.

  5. Create a new AL extension project. Select View > Command Palette... (Ctrl+Shift+P).

  6. Enter AL: Go! in the search box and select the command from the list.

  7. Accept the suggested path (or enter another path).

  8. Select the 4.0 Business Central 2019 release wave 2 target platform.

  9. Select Microsoft cloud sandbox as the development endpoint.

  10. Download the application symbols. Select View > Command Palette... (Ctrl+Shift+P).

  11. Enter AL: Download symbols in the search box and select the command from the list.

  12. If requested, provide your organizational credentials (Microsoft 365 account/Microsoft Entra ID account).

  13. Open the app.json file and change the Name setting to Social Media. Change the Publisher setting to Cronus International Ltd.

  14. Remove the HelloWorld.al file.

  15. Select File > New File and immediately save the file by selecting File > Save. Name the file SocialMedia.TableExt.al.

  16. Create a new table extension in the file by using code snippets. Enter ttableext and press the Tab key.

  17. Change the ID to 50110 and the Name to CRONUS Social Media Table Ext.

  18. Make sure that the table extension extends the Customer table.

  19. Create the fields from the following table:

    Field No. Field Name Data Type Length
    50110 Facebook Text 50
    50111 X, formerly Twitter Text 30
    50112 Instagram Text 50
    50113 LinkedIn Text 50
  20. Set the Caption and DataClassification properties for each field.

  21. Remove the other code in the file (remove the variable myInt).