Implicit Type Property in Page Extension Problem
Version: Business Central 12.0.21.1229.0.
Issue:
- Please refer to attached file for complete description and Screen Shots: Implicit Type Page Extension Problem.docx
Could you please explain why we have this ImplicitType property when we export pages in NewSyntax ? (if export page as normal text file this property does not exist). Also, is there any other solution for this situation besides adding a new custom field and hiding the standard one ?
Thanks.
----------- description from attached file ------------------------------------------------------ Table Proposal Line 11000000. Field Description 1 was Code[32] in Standard. We increased length to Code[40]. Moving to extension page 11000001 Telebank Proposal (has source table Proposal Line).
Error in page Extension: Unsupported feature: Property Modification (Implicit Type)
If we ignore error, in the page if we try to enter a text between 33-40 characters it will fail. Even if in table the field has the max length 40 characters.
Hi @andreilungu, the implicit type property you see here is the internal property that we are using in order to get the type of the page field. As it is not possible to modify the type of a page field or a table field in AL, modifications on the type in delta files are exported as a warning in AL.
In your case, you have modified the table field Description 1 from Code[32] to Code[40], the type of all the page fields referencing that table field as source (like your page field Description 1) has then also been changed from Code[32] to Code[40]. This is why you end up in your code with a warning about modifying the implicit type of the page.
Concerning the error you are getting in the UI, this is because the source field in your table still has a length of 32 so any code longer than this will generate an error. You need to rethink your approach by using only code of length lower than 32 or by adding a new field to the original table with a type of Code[40] and making the necessary modifications.
"Because the original field in your table still has a length of 32"
My "original table" is my modified table: with length 40 in the database. We don't understand why in the page we cannot add more than 32 characters.
If you are aiming at using Business Central, you need to exports all the objects that you have modified and convert them to AL. In your issue, you are mentioning a page extension, but you should also have a table extension in your project as you modified the source table of the page you have extended. However, in AL some modifications are not allowed in table extensions: like changing the name or type of fields from the base table.
When modifying your table in CSIDE, you changes are only made locally (meaning on your machine). And if you are running CSIDE and AL side by side, you might be able to see in VS Code that the field length has been modified in the new set of symbols that you downloaded locally. However, when trying to publish to Business Central, the modifications you have made in CSIDE and which are not part of the AL project you are publishing won't be considered. The set of symbols in BC remains unchanged there. This is why the length of the source field is still 32 and not 40 in your source table.
I guess, as you mentioned, the solution in your case is to hide the field of length 32 and add a new one of length 40 in a table extension.
@qutreson It's starting to make sense, let me explain our scenario: We're in the embed app ready to go program and we currently have a hybrid scenario where all of the modified tables are still in C/SIDE and we're currently in the process of moving all of the customized standard NAV pages to page extensions.
So even in this hybrid scenario which will never run on the Dynamics 365 service (extensions only) a field with increased length is not supported?
It is supported. However, you need to make sure that you generate delta files only for changes that you want to move into an extension. In other words the baseline for deltra generation already needs to include table changes that you're making as part of the base app code customization.
I would encourage you to use the Embed App Yammer group for further questions since embed apps are not a publicly available program.
Thanks a lot for your clarification @qutreson and @StanislawStempin, it's clear now. If more questions arise I'll post them in the yammer group.