#NAVdevTips 4: TableExtension – sky is the limit?
I still exploring tableextension object and I found that it has one very huge benefit. Seems that there is no record size limit when using tableestension. At least my test shows that it is very hard to get to the limit (if any exists).
As you probably know when developing in C/AL we had 8kb limit of record. Which sometime was very annoying especially with a lot of customer modifications .
So let’s try the same with AL and table extension. You need to trust me that I added 30 of similar fields as on the screen below.
And it was compiled. As there was no error I thought – maybe I will get error when adding data to table. However still no error.
Any threads if this is ok?
I wanted to ask the question on github to Microsoft team but it was already asked. Seems that for now there is no errors message when added fields over 8kb limit to records. But probably it will be added in future (https://github.com/Microsoft/AL/issues/1777). However from other side it was also said (https://github.com/Microsoft/AL/issues/347) that for companions (so as I understand tableextension) there is no limitation:
Companion tables don’t count against the base table limitation.
Hi,
To start with: really liked the post 🙂
Secondly, as far as I know one of the SQL-level changes is that in ext. 1.0 the actual table that was extended had its structure changed and new fields were added, whereas in ext 2.0 a new table is created that shares the PK with the table being extended and all the fields added by extension are placed in that additional table.
Hi Kris,
I think this is a misunderstanding of “Companion tables don’t count against the base table limitation.”: You need to stress the word “base”, meaning that the additional fields do not add to the BASE table limitation, but to COMPANION table limitation.
See also https://github.com/Microsoft/AL/issues/1777#issuecomment-379011180
Thus, create a new table with all the fields of the standard customer table PLUS your additional test fields and try again?
Hi yes you are right it does not count to BASE Table – means we can extend the table with more fields as we had possible in C/AL – I think someone counted and in Extension Table you can add around 100 or 200 fields of Text 250.