Dynamics 365 Business Central: PageExtension name is shown in Tell Me? Be careful with the GenerateCaptions feature in app.json

Dynamics 365 Business Central

Hi, Readers.
Yesterday I found a very interesting question on the Dynamics 365 Business Central Community Forum.
Search is showing page extension name – Dynamics 365 Business Central Forum Community Forum

In short, the following problem occurred, the standard page caption (Customers) was changed to the name of the PageExtension object (ZY Customer List Ext).

At first, I suspected it was a problem with the translation file, because we can use the translation file (.xlf file) to change the names of standard pages and fields.
More details: Changing caption/name of existing field (Two ways)

But there is nothing wrong when I check the translation files. The translation file is empty.

So why? After some communication, finally we found the reason. This is caused by the GenerateCaptions feature in app.json file.

GenerateCaptions: Generate translation entries for captions for all

In JSON Files:

featuresNoSpecifies a list of options.

The TranslationFile option generates a \Translations folder that is populated with the .xlf file that contains all the labels, label properties, and report labels that you are using in the extension. The GenerateCaptions option depends on the TranslationFile setting. It generates captions for objects that do not have a Caption or CaptionML specified, these are then written to the .xlf file.

The GenerateLockedTranslations flag is used to generate <trans-unit> elements in the XLIFF file for locked labels. The syntax is "features": [ "TranslationFile", "GenerateCaptions", "GenerateLockedTranslations" ]. For more information, see Working with Translation Files.

When the NoImplicitWith flag is specified, ImplicitWith will be disabled by default. This flag is useful when all code has been rewritten to avoid any future usage of ImplicitWith. For more information, see Pragma ImplicitWith and Deprecating Explicit and Implicit With Statements.

Let’s watch a test video: Version: W1 20.0 (Platform 20.0.37114.39096 + Application 20.0.37253.38055)
No extension -> Extension with GenerateCaptions feature -> Extension without GenerateCaptions feature

I’m not sure if this is a bug, but it looks like GenerateCaptions feature will generate captions for all objects including PageExtension. So if you encounter similar problems, please check your app.json file first.

PS: ReportExtension does not have this problem.

END

Hope this will help.

Thanks for reading.

ZHU

コメント

Copied title and URL