Empty captions should be locked
Properties
AC0018
Warning
Design
Code Fix
Ignore Obsolete
When an AL developer sets Caption = '' to suppress a UI label or clear inherited text, the translation framework still extracts that empty string into XLIFF files. Translators see a blank translation unit with no source text — an entry they must review and skip for every target language.
Adding Locked = true tells the framework to skip extraction entirely.
Example
The following table field has an empty caption without the Locked property:
table 50100 MyTable
{
fields
{
field(1; MyField; Integer)
{
Caption = ''; // Empty captions should be locked [AC0018]
}
}
}To fix this, add Locked = true:
table 50100 MyTable
{
fields
{
field(1; MyField; Integer)
{
Caption = '', Locked = true;
}
}
}Code fix
The code fix adds Locked = true to the empty Caption property.
See also
- Caption Property on Microsoft Learn
- Working with Translation Files on Microsoft Learn