Hi, Readers.
The public preview for Dynamics 365 Business Central 2025 release wave 2 (BC27) is available. Learn more: Link.
I will continue to test and share some new features that I hope will be helpful. In this post, I would like to talk about Editable fields in page customizations.
This new feature is not yet documented in the Business Central 2025 release wave 2 (BC27) release plan but is mentioned in AL Language extension changelog Version 16.0.
You can now make page fields defined in page customizations editable. Previously, such fields were always read-only, unlike fields declared in pages or page extensions.
Changelog | Visual Studio Marketplace
With this wave (BC27), we can now make page fields defined in page customizations editable. For example,
In BC26.5 and previous versions:
‘Marking Controls as Editable In Page Customizations’ is not available in runtime version ‘15.0’. The supported runtime versions are: ‘16.0’ or greater. AL AL0666
However, please note that this has limitations and you need to define the AllowInCustomizations property as AsReadWrite in the field properties in advance.
We briefly discussed this in the following post.
Business Central 2025 wave 2 (BC27): New values (AsReadOnly & AsReadWrite) for the AllowInCustomizations property
AsReadWrite– allows fields to be made editable in page customizations: The field can be used as source expression for new page fields in page customizations, and it can be made editable.
The default value ToBeClassified and the obsolete value Always both behave like AsReadOnly.
- ToBeClassified – The field has not yet been given a classification. By default, the field can be used as source expressions for new page fields in page customizations, but it cannot be made editable.
Because as of the current version, this AllowInCustomizations property is basically not defined in the standard fields and is the default value, so when you add a standard field and set the Editable property, the following error will be prompted.
You cannot set the ‘Editable’ property to ‘true’ for Control ‘NewName’ in the page customization ‘MyCustomization’. Reason: ‘The source table field has AllowInCustomizations set to ‘ToBeClassified’.’. AL AL0808
And on table extensions, this only applies to fields declared in the table extension and does not affect the base table fields.
The property ‘AllowInCustomizations’ cannot be customized. AL AL0246
Great, give it a try!!!😁
PS: As before, if you use Page Extension, you will not be controlled by this property.
END
Hope this will help.
Thanks for reading.
ZHU
コメント