Business Central 2022 wave 2 (BC21) new features: ApplicationArea on fields defaults to page value

Dynamics 365 Business Central

Hi, Readers.
The preview environment for Dynamics 365 Business Central 2022 release wave 2 (BC21) is available. Learn more: Link.

I will continue to test and share some new features that I hope will be helpful.

ApplicationArea on fields defaults to page value:

Business value:

Application areas represent a feature in the system that offers developers, administrators, and users the ability to define differentiated user experiences. They are mapped to controls to show or hide them on page objects to enable more or fewer business scenarios. Page controls or actions without application area are not displayed in cloud experiences. Usually, however, the individual page controls would have the same ApplicationArea as the parent page, so having to set this individually on each page control leads to redundant work as well as forgetting to set it, which means that the control is not showing up.

https://docs.microsoft.com/en-us/dynamics365-release-plan/2022wave2/smb/dynamics365-business-central/field-applicationarea-defaults-page-value

This is helpful when we create new pages in Business Central.
Let’s see more details.

When targeting runtime version 10.0 (that is, 2022 release wave 2) or higher:

  • Page controls without the ApplicationArea property explicitly set now inherit the ApplicationArea defined on the parent page (or report if request page).

For example, I created a new page and only set the ApplicationArea of the parent page.

All fields are now displayed properly. (We can finally get rid of adding ApplicationArea manually)

PS:
You can set the ApplicationArea for each control individually.
For example, I am using the Essential license and I have set the ApplicationArea of the Name field to Service.

Name field will not be displayed in the page until I switch the license to Premium.

More details: How to make your custom features available only with the Premium license (ApplicationArea Property)

  • Rules AS0062 and PTE0008 have been updated to allow not specifying an explicit ApplicationArea on the page control, as long as it is set on the parent object level, thereby providing a default.

AppSourceCop Error AS0062: Page controls and actions must use the ApplicationArea property

PerTenantExtensionCop Error PTE0008: Page controls and actions must use the ApplicationArea property

  • ApplicationArea can now be used without UsageCategory on pages to provide a default fallback for controls, without forcing search visibility.

There is no error.

PS:
In BC20 (runtime version 9.0) and previous versions:

The property ‘ApplicationArea’ can only be set if the property ‘UsageCategory’ is set with any of the values of :’Lists,Tasks,ReportsAndAnalysis,Documents,History,Administration’ (Compiler Error AL0167)

  • No impact on search; UsageCategory and ApplicationArea are still both required.
  • No impact on page (or report) extensions; values must still be set explicitly there.

Without ApplicationArea:

With ApplicationArea:

PS: The property ‘ApplicationArea’ cannot be customized.AL(AL0246)

Update from Business Central Launch Event (2022 release wave 2) 

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL