Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

page extension drop down on item card

Posted on by 41

Hi All,

Ive created a new table and page, which i populated with some data.

I then needed a field on the item card to link this data to the item.

This is populated with 3 columns , Pump ID ., description 1 and description 2

So i created a table extension and page extension.

It works fine , only issue im having is for the field on the item card (page ext) when i go to select from the dropdown list, i only see the Pump ID , i dont see the descripton

Screenshot-2023_2D00_05_2D00_03-at-11.30.16-PM.png

tableextension 90601 "Pump Sel" extends Item
{

    fields
    {
        field(90601; "Pump Sel"; code[20])
        {
            TableRelation = "Pump Selector"."Pump ID";
            Caption = 'Pump Selection';
        }
        field(90602; Description1; text[100])
        {
            TableRelation = "Pump Selector".Descritpion1;
            Caption = 'Description 1 ';
        }
        field(90603; Description2; text[100])
        {
            TableRelation = "Pump Selector".Descritpion2;
            Caption = 'Description 2';
        }
    }

}





pageextension 90601 PumpSel extends "Item Card"
{
    layout
    {
        addafter("VAT Bus. Posting Gr. (Price)")
        {
            field("Pump Selection"; Rec."Pump Sel")
            {
                ApplicationArea = all;
                Caption = 'Pump Selection';
            }
        }
    }
}

Any help would be greatly appreciated!

Thanks!

Categories:
  • Suggested answer
    Govinda Kumar Profile Picture
    Govinda Kumar 2,203 Super User 2024 Season 1 on at
    RE: page extension drop down on item card

    Hi,

    As Mr. Nitin Verma said above, you can add a fieldgroup to your table "Pump Selector" in order to display the description with ID.. I mean you can choose which fields you want to see in the lookup..

        fieldgroups
        {
            fieldgroup(DropDown; "Pump ID", Descritpion1)
            {
    
            }
        }

    Regards

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: page extension drop down on item card

    You can try to create fieldgroup in this table. Like this code you can put your fields what you want to see.

     fieldgroups
        {
            fieldgroup(DropDown; "No.", Description, "Base Unit of Measure", "Unit Price")
            {
            }
            fieldgroup(Brick; "No.", Description, Inventory, "Unit Price", "Base Unit of Measure", "Description 2", Picture)
            {
            }
        }

  • Rajiv Sewsarran Profile Picture
    Rajiv Sewsarran 41 on at
    RE: page extension drop down on item card

    Same result - here's the updated table code

    table 90600 "Pump Selector"

    {

       DataClassification = ToBeClassified;

       LookupPageId = "Pump Selector";

       DrillDownPageId = "Pump Selector";

       fields

       {

           field(1; "Pump ID"; Code[20])

           {

               DataClassification = ToBeClassified;

           }

           field(2; Descritpion1; text[100])

           {

               DataClassification = ToBeClassified;

           }

           field(3; Descritpion2; text[100])

           {

               DataClassification = ToBeClassified;

           }

       }

       keys

       {

           key(Key1; "Pump ID")

           {

               Clustered = true;

           }

           key(Key2; Descritpion1)

           {

           }

       }

       var

           myInt: Integer;

       trigger OnInsert()

       begin

       end;

       trigger OnModify()

       begin

       end;

       trigger OnDelete()

       begin

       end;

       trigger OnRename()

       begin

       end;

    }

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: page extension drop down on item card

    set Drilldownpageid property with same page too and then try. also share your code.

  • Rajiv Sewsarran Profile Picture
    Rajiv Sewsarran 41 on at
    RE: page extension drop down on item card

    Hey thanks for your response.

    I did that and the result is the same

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,091 Super User 2024 Season 1 on at
    RE: page extension drop down on item card

    on New table you have created just add your List page to that table with property LookupPageID = "List page id; and then check

    pastedimage1683171435552v1.png

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans