AL icon indicating copy to clipboard operation
AL copied to clipboard

Enum value hided in page if contains single double quote

Open JPicard90 opened this issue 5 years ago • 5 comments

If an enum caption value contains a single double quote “ at the end the following enums will not be shown.

value(50048; "My value 8")
{
    Caption = '8"'; //Breaks value 9 to show
}
value(50049; "My value 9")
{
    Caption = '9';
}

If a single char in a captain is not allowed, I expect a compiler issue.

Versions:**

  • AL Language: 7.2
  • Visual Studio Code: 1.60.2
  • Business Central: 18.5.29545.0

JPicard90 avatar Sep 24 '21 08:09 JPicard90

Hi @JPicard90,

Unfortunately, I can't reproduce the issue, could you please provide more information?

This is what I see: image

nndobrev avatar Sep 29 '21 07:09 nndobrev

sorry, i forget to specify:

so use this enum inside a table, use the table inside a page of "ListPart" type

JPicard90 avatar Sep 29 '21 10:09 JPicard90

@JPicard90, can you please provide code sample that reproduces the issue :)

nndobrev avatar Sep 29 '21 11:09 nndobrev

enum 50010 "Test Enum"
{
    Extensible = true;

    value(50044; "Enum Visible 1")
    {
        Caption = 'Enum Visible 1';
    }
    value(50048; "Enum Visible 2")
    {
        Caption = 'Enum Visible 2';
    }
    value(50049; "With Error")
    {
        Caption = 'With Error"';
    }
    
    value(50050; "Non Visible")
    {
        Caption = 'Non Visible';
    }
}
table 50000 "Record Update Request line"
{
    Caption = 'Righe richiesta modifica record';
    DataClassification = ToBeClassified;

    fields
    {
        field(1; "Request ID"; Code[20])
        {
            Caption = 'ID Richiesta';
            DataClassification = ToBeClassified;
        }

        field(3; "Line No."; Integer)
        {
            Caption = 'Line No.';
            DataClassification = ToBeClassified;
        }



        field(200; "Test Enum"; Enum "Test Enum")
        {
			Caption = 'Test Enum';
            DataClassification = ToBeClassified;
        }
	}
	keys
    {
        key(PK; "Request ID", "Line No.")
        {
            Clustered = true;
        }
    }
}
page 50000 "Customer Update Rec. Subpage"
{

    Caption = 'Campi da aggiornare cliente';
    PageType = ListPart;
    SourceTable = "Record Update Request line";
	AutoSplitKey = true;
    layout
    {
        area(content)
        {
            repeater(General)
            {
                field("Test Enum"; rec."Test Enum")
                {
                    ApplicationArea = All;
                }
            }
        }
    }
}

JPicard90 avatar Sep 29 '21 12:09 JPicard90

The fix for this issue has been checked in to the master branch. It will be available in the bcinsider.azurecr.io/bcsandbox-master Docker image starting from platform build number 31054 and VS Code Extension Version 9.0.527342.

If you don’t have access to these images you need to become part of the Ready2Go program: aka.ms/readytogo

For more details on code branches and docker images please read: https://blogs.msdn.microsoft.com/nav/2018/05/03/al-developer-previews-multiple-releases-and-github/ https://freddysblog.com/2020/06/25/working-with-artifacts/

JesperSchulz avatar Oct 12 '21 13:10 JesperSchulz