microsoft / AL

Home of the Dynamics 365 Business Central AL Language extension for Visual Studio Code. Used to track issues regarding the latest version of the AL compiler and developer tools available in the Visual Studio Code Marketplace or as part of the AL Developer Preview builds for Dynamics 365 Business Central.
MIT License
745 stars 244 forks source link

On table with RecordID in Primary Key the system part "Link" not working on view #6117

Closed Drakonian closed 4 years ago

Drakonian commented 4 years ago

Describe the bug On table with RecordID in Primary Key the system part "Link" is not working on view. So, my table:

table 60008 "XPL Media Entity"
{
    Caption = 'Media Entity';
    DataClassification = CustomerContent;
    DrillDownPageId = "XPL Media Entity";
    LookupPageId = "XPL Media Entity";
    fields
    {
        field(1; "Record ID"; RecordId)
        {
            Caption = 'Record ID';
            DataClassification = CustomerContent;
            Editable = false;
        }
        field(3; "Entry No."; BigInteger)
        {
            Caption = 'Entry No.';
            DataClassification = CustomerContent;
            AutoIncrement = true;
        }
 }
    keys
    {
        key(PK; "Record ID", "Entry No.")
        {
            Clustered = true;
        }
    }
}

My page:

page 60009 "XPL Media Entity"
{

    ApplicationArea = All;
    Caption = 'Media';
    PageType = List;
    SourceTable = "XPL Media Entity";
    UsageCategory = Lists;
    SourceTableView = sorting("Presentation Order");

    layout
    {
        area(content)
        {
            repeater(General)
            {

                field(Description; Description)
                {
                    ApplicationArea = All;
                    ToolTip = 'Specifies the Description';
                }

            }
        }
        area(FactBoxes)
        {
            systempart("XPL Links"; Links)
            {
                ApplicationArea = RecordLinks;
            }
        }
    }
}

After, I try to add some Links to my list page and they added but not showing in systempart: image

Also, when I inspect system table "Record Link" the record belongs to my table "XPL Media Entity" is presented. image

Expected behavior This is due to the fact that the system cannot successfully read RecordID + Integer from PK of my table within the system table PK RecordID. This functionality just should work.

5. Versions:

thpeder commented 4 years ago

HI @Drakonian, Thanks for reporting the issue. Let's get the issue to a team who will fix and backport it, as this repository is only for issues related to the AL compiler in latest developer preview environment for Dynamics 365 Business Central. We suggest that you open a support case or file a bug in Collaborate, to ensure that all Business Central users benefit from your catch as soon as possible.

To open a support case, you can:

If you file the bug in Collaborate, remember to include steps to reproduce the issue, and the Business Central build number and country version you're using.