HELP with AL Development for Dynamics 365 Business Central

Copper Contributor

I need to show the table in the Brand Name field, but not all columns, but only two (Code and Description). The field "Brand Name" should be similar to the work of the field "Serial Nos.". Look, when the field expands, a table with two columns appears. I need the same, you know?
That is, I mean that I need the Code column and the Description column in the same form as the Serias Nos. field (code and description)

I need the same field, but I will name it the "brand name" and there I will have a Item table with a code and description.

 

My code:

tableextension 50115 "Brand Name" extends "Item"
{
    DataCaptionFields = "No.", Description;
    fields
    {

 

        field(50105; "Brand Name"; Text[250])
        {
            Caption = 'Brand Name';
            Description = 'It is a code and description';
            Editable = true;
            TableRelation = Item."No.";
            DataClassification = ToBeClassified;
        }
    }
}
pageextension 50115 ItemBrandPageExt extends "Item Card"
{
    layout
    {
        addlast(Item)
        {
            field("Brand Name";Rec."Brand Name")
            {
                ApplicationArea = All;
                Caption = 'Brand Name';
                ToolTip = 'It is code and description';
            }
        }
    }
}
 
query 50115 ItemBrandQuery
{
    Caption = 'ItemBrandQuery';
    QueryType = Normal;
    QueryCategory = 'Item';
    elements
    {
        dataitem(Item; Item)
        {
            column(No; "No.")
            { Caption = 'Code';
            }
            column(Description; Description)
            {Caption = 'Description';
            }
        }
    }
    trigger OnBeforeOpen()
    begin
    end;
}

010b1a75-ee51-47a4-a146-2e0c3c3f02e6.png

1 Reply
Hi,

for that you would need a lookup page and a table containing the brand names.
you could use instead an enum field with pre-defined values.

best you post your question in the bc forum:
https://community.dynamics.com/forums/thread/?partialUrl=business

this community is not the right place for that topics, especially here in the microsoft exchange server community.

regards franz