Wednesday, November 28, 2018

What is a Table Extension in Dynamics 365 Business central?

What is a Table Extension?

The Table Extension object is used to extend existing tables in the Microsoft Dynamics 365 Business Central application. 

We can add new fields, but not delete or change existing fields. There are certain table properties that cannot be modified 

with a Table Extension (like for example the ID and Name of table). We can create new secondary keys, but cannot 

modify the primary key. 

Creating a table extension works the same way as creating a table.
tableextension 70000020 SocialMediaChannel extends Customer
{
fields
{
field(70000100;Facebook;Text[50])
{
ExtendedDataType=URL;
}
field(70000101;Twitter;Text[50])
{
ExtendedDataType=URL;
}
field(70000102;Instagram;Text[50])
{
ExtendedDataType=URL;
}
field(70000103;Skype;Text[50])
{

}
}
}

Overview

The Table Extension object is used to extend existing tables in the Microsoft Dynamics 365 Business Central application. We can add new fields, but not delete or change existing fields. There are certain table properties that cannot be modified with a Table Extension (like for example the ID and Name of table).  We can create new secondary keys, but cannot modify the primary key.

Example

Creating a table extension works the same way as creating a table.
tableextension 70000020 SocialMediaChannel extends Customer
{
fields
{
field(70000100;Facebook;Text[50])
{
ExtendedDataType=URL;
}
field(70000101;Twitter;Text[50])
{
ExtendedDataType=URL;
}
field(70000102;Instagram;Text[50])
{
ExtendedDataType=URL;
}
field(70000103;Skype;Text[50])
{

}
}
}

No comments:

Post a Comment