Skip to main content
Community site session details

Community site session details

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

Reg - Customizing the selected lines to view alone respected page for particular item

(0) ShareShare
ReportReport
Posted on by 190

Hi Friends,

I'm stuck in a part that actually my requirement is to :

I have to select the single line in a page and I should ADD Action button

After when I select that line and click action button it should display the variant that is specifies only for the particular Item what I added to the variants.

For Example , You can take in Item Card as an example  when you click Item availability by variant it specifies particular thing alone  

rather In lines I want to select and view ...using AL CODE

Thanks & Regards

Karthikeyani C

  • Suggested answer
    Amit Baru Profile Picture
    3,029 on at
    RE: Reg - Customizing the selected lines to view alone respected page for particular item

    Hi,

    please share the written code, I will check and correct it.

    Regards

    Amit Sharma

    www.erpconsultors.com

  • Suggested answer
    Nitin Verma Profile Picture
    21,571 Moderator on at
    RE: Reg - Customizing the selected lines to view alone respected page for particular item

    Hi,

    I have tried to create some AL objects for you, for just an idea, more you can changes according to your need.

    pageextension 60100 "Modify SubSOPage" extends "Sales Order Subform"
    {
        actions
        {
            addafter("F&unctions")
            {
                action(VariantSelection)
                {
                    ApplicationArea = All;
                    Caption = 'Select Variant';
                    Promoted = true;
                    PromotedIsBig = true;
                    PromotedCategory = Process;
                    image = SelectEntries;

                    trigger OnAction()
                    var
                        VariantSelection: Page "Variant Selection";
                    begin
                        if rec.Type = rec.Type::item then begin
                            VariantSelection.SetRequest(rec."No.");
                            VariantSelection.RunModal();
                        end;
                    end;
                }
            }
        }
    }
    page 60102 "Variant Selection"
    {
        Caption = 'Variant Selection';
        PageType = ConfirmationDialog;

        layout
        {
            area(content)
            {
                group(General)
                {
                    field(ItemNo; itemNo)
                    {
                        ApplicationArea = all;
                    }
                }
            }

        }
        trigger OnQueryClosePage(CloseAction: Action): Boolean
        var
            ItemVariant: Record "Item Variant";
        begin
            ItemVariant.Reset();
            ItemVariant.SetRange("Item No.", ItemNo);
            Message('There are total %1 Variant found for Item No. %2', ItemVariant.Count, ItemNo);
        end;

        procedure SetRequest(ItemNo2: code[20])
        begin
            ItemNo := ItemNo2;
        end;

        var
            ItemNo: code[20];
    }
  • karthikeyani c Profile Picture
    190 on at
    RE: Reg - Customizing the selected lines to view alone respected page for particular item

    On the list page, how to show variants on selected lines and that should be selected and update in another Page.

    This is what I'm trying to ..

    Thanks and Regards ,

    Karthikeyani C

  • karthikeyani c Profile Picture
    190 on at
    RE: Reg - Customizing the selected lines to view alone respected page for particular item

    Yes, Absolutely correct

    but I didn't know and so much confused like how to code in my existing pages and tables

    can you please teach with  the syntax so I can get a better understanding.

    Thanks & Regards ,

    Karthikeyani C

  • Suggested answer
    Nitin Verma Profile Picture
    21,571 Moderator on at
    RE: Reg - Customizing the selected lines to view alone respected page for particular item

    Hi,

    I think somewhere you have to tell the system which line you want to select, for example if there are 100 lines, For which line you want to see the Variant, in that case you have to use a Dialog window should open, ask the particular Item and then show the variant for that selected item if found in the sales lines.

    Thanks.

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

News and Announcements

Now Available: 2025 Release Wave 2

Quick Links

Ramesh Kumar – Community Spotlight

We are honored to recognize Ramesh Kumar as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Sohail Ahmed Profile Picture

Sohail Ahmed 2,655

#2
Mansi Soni Profile Picture

Mansi Soni 1,574

#3
YUN ZHU Profile Picture

YUN ZHU 1,453 Super User 2025 Season 1

Featured topics

Product updates

Dynamics 365 release plans