Dynamics 365 Business Central: New feature “NoPromotedActionProperties” in the app.json

Dynamics 365 Business Central

Hi, Readers.
Minor update 21.1 for Business Central 2022 release wave 2 has been released last week. Learn more: Link.
Today I would like to share a new feature “NoPromotedActionProperties” in the app.json from BC 21.1.

This information is not mentioned in What’s new and planned for update 21.1, but is recorded in AL Language Changelog version 10.1 (AL Release Notes).
More details:

Added a new feature “NoPromotedActionProperties” in the app.json to enforce the usage of the promoted area and actionref syntax in the extension.

In AL Language V10.0 (BC 21.0):

In AL Language V10.1 (BC 21.1):

NoPromotedActionProperties: Switch off the option of using promoted properties instead of the promoted area and actionref syntax.

This new feature is related to the New Modern Action Bar.
More details:

Some key info about Modern Action Bar:

Up to now (2022.11.14), We can use either old model (V1) or new model (V2) in our extensions, but not mixed.

For example,

But when we set ‘NoPromotedActionProperties’ feature in the app.json.

The following error will be displayed when you using the old model (V1).

The property ‘PromotedCategory’ is not allowed on PageAction ‘MyAction’ because the PageObject ‘MyPage’ is using the ActionRef syntax or the app.json specifies the ‘NoPromotedActionProperties’ feature.

The property ‘Promoted’ is not allowed on PageAction ‘MyAction’ because the PageObject ‘MyPage’ is using the ActionRef syntax or the app.json specifies the ‘NoPromotedActionProperties’ feature.

In conclusion, it is helpful to turn on this feature when you only want to use the new model (V2). But when you also have old model (V1), or when both exist in your extension, please do not set this feature.

Give it a try!!!😁

PS:

The “NoPromotedActionProperties” feature is disabled by default up to now (2022.11.14):

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL