Skip to content

Fields with locked caption at table/table extension level are not displayed on pages with the given caption #8186

@antoniolgr-divimast

Description

@antoniolgr-divimast

Please include the following with each issue:

1. Describe the bug
Adding fields to table/table extension with locked caption are displayed on pages with the field name rather then the given caption.

2. To Reproduce

  1. Create a table and a table extension with a new field
  2. Add a caption to the field with the property Locked set to true
  3. Create a page and a page extension and add the field.
  4. Note that the caption of the field shown in the page is not the caption set into the table/table extension, but the name of the field.
tableextension 50324 Vendor extends Vendor
{
    fields
    {
        field(50320; "Name 3"; Text[50])
        {
            Caption = 'Nome 3', Locked = true;
            DataClassification = CustomerContent;
        }
    }
}

pageextension 50321 "Vendor Card" extends "Vendor Card"
{
    layout
    {
        addafter("Name 2")
        {
            field("Name 3"; Rec."Name 3")
            {
                ApplicationArea = All;
            }
        }
    }
}

table 50325 "My Entity"
{
    fields
    {
        field(50320; "Name 3"; Text[50])
        {
            Caption = 'Nome 3', Locked = true;
            DataClassification = CustomerContent;
        }
    }
}

page 50321 "My Entities"
{
    Caption = 'My Entities';
    PageType = List;
    SourceTable = "My Entity";
    ApplicationArea = All;
    UsageCategory = Lists;

    layout
    {
        area(Content)
        {
            repeater(Control1)
            {
                field("Name 3"; Rec."Name 3")
                {
                }
            }
        }
    }
}

Note: Because the developers need to copy and paste the code snippet, including a code snippet as a media file (i.e. .gif) is not sufficient.

3. Expected behavior
The page shows the field with the caption given at table/table extension level.

4. Actual behavior
The page shows the name of the field as caption instead of the given caption.

5. Versions:

  • AL Language: 17.0.1998613
  • Visual Studio Code: 1.108.0
  • Business Central: IT Business Central 27.3 (platform 27.0.44301.0 + application 27.3.44313.44331)
  • Operating System:
    • Windows
    • Linux
    • MacOS

Final Checklist

Please remember to do the following:

  • Search the issue repository to ensure you are reporting a new issue

  • Reproduce the issue after disabling all extensions except the AL Language extension

  • Simplify your code around the issue to better isolate the problem

Internal work item: AB#619449

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions