Real things I’m asked – add a field to the DropDown

  • Q: Can you add the “Search Description” to the Item DropDown?

A: Yes. In Microsoft Dynamics 365 Business Central, the DropDown fieldgroup determines the fields displayed when showing records on a dropdown page. 

Additional fields can be added to the DropDown fieldgroup using the addlast keyword in an AL Table Extension. Base table and new fields can be added to the DropDown fieldgroup.

tableextension 50100 "DVLPR Item Ext" extends Item
{
    fields
    {
        field(50100; "DVLPR New Field"; Boolean)
        {
            Caption = 'New Field';
            DataClassification = CustomerContent;
        }
    }

    fieldgroups
    {
        addlast(DropDown; "DVLPR New Field", "Search Description")
        { }
    }
}

Note: The syntax for using a DropDown must be exactly DropDown with the correct capitalization. The server will remove the duplicates if multiple extensions attempt to add the same field more than once. Fields can only be added to the field group once. Fields can only be added with addlast and fields cannot be removed through a Table Extension.

Click here to learn more about Field Groups (DropDown Controls) in Microsoft Dynamics 365 Business Central.

Note: The code and information discussed in this article are for informational and demonstration purposes only. This content was created referencing Microsoft Dynamics 365 Business Central 2022 Wave 2 online.

Leave a Reply

Your email address will not be published.