anzwdev / al-code-outline

AL Code Outline for Visual Studio Code
MIT License
51 stars 13 forks source link

Code Action "Add multiple fields" doesn't work when SourceTable includes a dot #532

Closed achim-t closed 3 months ago

achim-t commented 7 months ago

image image

mail2joh commented 5 months ago

I have installed version v12.0.59, but I still can not see any fields to add when table includes a dot.

zabcik commented 5 months ago

I have installed latest v13.0.61 and issue still exists. There are 3 code samples to reproduce 2 issue behaviors. No errors are logged.

WorkingTickets.al:

table 50101 "WorkingTicket Header"
{
    DataClassification = ToBeClassified;

    fields
    {
        field(1; "No."; Code[20])
        {
            DataClassification = ToBeClassified;

        }
    }

    keys
    {
        key(Key1; "No.")
        {
            Clustered = true;
        }
    }
}

page 50101 "WorkingTickets"
{
    SourceTable = "WorkingTicket Header";
    PageType = List;

    layout
    {
        area(Content)
        {
            repeater(Control1)
            {
                // Codeaction "Add multiple fields (AZ AL Dev Tools)"
                // The fields "Select table fields" provided are fine.
            }
        }
    }
}

NotWorkingTickets.al:

table 50100 "NowWorkingTicket Hdr."
{
    DataClassification = ToBeClassified;

    fields
    {
        field(1; "No."; Code[20])
        {
            DataClassification = ToBeClassified;

        }
    }

    keys
    {
        key(Key1; "No.")
        {
            Clustered = true;
        }
    }
}

page 50100 "NotWorking Tickets"
{
    SourceTable = "NowWorkingTicket Hdr.";
    PageType = List;

    layout
    {
        area(Content)
        {
            repeater(Control1)
            {
                //TODO Fix BUG1
                // Codeaction "Add multiple fields (AZ AL Dev Tools)"
                // The fields "Select table fields" are not provided.
                // Nothing happened.
                // No error is logged.
                // See table name "NowWorkingTicket Hdr." (trailing with dot)
            }
        }
    }
}

NotWorkingTickets2.al:

table 50103 "NotWorkingTicket Hdr. 2"
{
    DataClassification = ToBeClassified;

    fields
    {
        field(1; "No."; Code[20])
        {
            DataClassification = ToBeClassified;

        }
    }

    keys
    {
        key(Key1; "No.")
        {
            Clustered = true;
        }
    }
}

page 50103 "NotWorkingTickets 2"
{
    SourceTable = "NotWorkingTicket Hdr. 2";
    PageType = List;

    layout
    {
        area(Content)
        {
            repeater(Control1)
            {
                //TODO Fix BUG2
                // Codeaction "Add multiple fields (AZ AL Dev Tools)"
                // The fields "Select table fields" are provided, but list is empty.
                // See table name "NotWorkingTicket Hdr. 2" (contains dot)
            }
        }
    }
}
zabcik commented 4 months ago

@anzwdev Hello Andrzej, please, will you take a look at this bug. Thank you very much for your extension. :)

anzwdev commented 3 months ago

Thank you for reporting the issue, it has been fixed in the last release.