Table extension Object in Microsoft Dynamics 365 Business Central - AL programming

Using the table extension object, you can customise a table given by Dynamics 365 Business Central by adding new fields or altering existing ones. The same table can be expanded in this manner and treated as a single table. For a retail winter sports store, you might want to design a table extension, for example. On the customer table, you'd want to add a new field called "ShoeSize." Code for the customer's record can be included, as well as information on their shoes.

  1. Open VS Code
  2. Install AL extension
  3. Create a new project (To by selecting the Sandbox or local server)
  4. Download Symbols
  5. Create a new file with AL extension
  6. Type ttable ext you will get a snippet as shown below

tableextension Id MyExtension extends MyTargetTable

{

? ? fields

? ? {

? ? ? ? // Add changes to table fields here

? ? }

? ? var

? ? ? ? myInt: Integer;

}

The keywords are bolded

you can specify the ID allocated to you (mostly between 50000 to 99999)

Replace any meaningful table name in MyExtension

Specify the existing table name in the MyTargetTable (The table which you wish to extend)

If you have any doubt, please leave a reply.


Reference: https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-table-ext-object

要查看或添加评论,请登录

Dr. S. Gomathi的更多文章

社区洞察

其他会员也浏览了