Skip to main content

Notifications

Business Central forum
Suggested answer

Extending or add the field to query page

Posted on by 190

Dear Experts

i want to add Total Rem Qty(in all locn), unit price * qty and qty in transit into this subquery page or report. i cant able to get the code and no extension is listed over there to add it in dependencies.

how can we take the code and add those fields for getting the desired page or report

locationwise-item2554.jpg

  • LearnBC Profile Picture
    LearnBC 190 on at
    RE: Extending or add the field to query page

    Thanks for the reply Zhu

    am trying to bring one lookup field with the help of of your blog, but am getting error and not getting the desired output. kinldy request your kind help on this. i just want to select the value from dimensions values under the dimension name " item subcategory"

    tableextension 62000 "Item Sub Category" extends Item
    {
        fields
        {
            // Brought a new field to get the item sub category on Item Card Page
            field(62001; "Item Sub Cagetory "; Text[100])
            {
                DataClassification = ToBeClassified;
                Caption = 'Item Sub Category';

            }

        }
    }
    pageextension 62002 "Item Sub Category Code" extends "Item Card"
    {
        layout
        {
            addafter("Item Category Code")
            {
               
                field("Item Sub Cagetory "; Rec."Item Sub Cagetory ")
                {
                    ApplicationArea = All;
                    Caption = 'Item Sub Category Code';


                    trigger OnLookup(var Text: Text): Boolean
                    var
                        ItemRec: Record Dimension;

                    begin
                        ItemRec.Reset();
                        if Page.RunModal(Page::"Dimension Values", ItemRec) = Action::LookupOk then
                            Item Sub Cagetory := ItemRec.Name;
                    end;

                }
            }
        }

       
    }
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 69,639 Super User 2024 Season 2 on at
    RE: Extending or add the field to query page

    Hi, you can unzip the app file I uploaded, there are these codes in the scr folder.

    Also, calculations are not supported in Query Object.

    You can use the following method to add to a new page.

    https://yzhums.com/4869/

    Hope this helps.
    Thanks.

    ZHU

  • LearnBC Profile Picture
    LearnBC 190 on at
    RE: Extending or add the field to query page

    Thank you for the Reply

    i can't able to see the extension in page extension and also i copied the dependency as you given in the blog and put in the app.json file then also its not downloading.

    how can i bring Total Rem Qty (in all locn), unit price * qty and qty in transit also in this

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 69,639 Super User 2024 Season 2 on at
    RE: Extending or add the field to query page

    Hi, hope the following helps.

    How to download “_Exclude_Microsoft Dynamics 365 – Smartlist” extension source code (Such as query 2554 “Items By Location”)

    https://yzhums.com/10217/

    [View:/cfs-file/__key/communityserver-discussions-components-files/758/Microsoft_5F005F00_Exclude_5F00_Microsoft-Dynamics-365-_2D00_-SmartList_5F00_21.0.45833.0.app:320:240

    query 2554 "Items By Location"
    {
        QueryType = Normal;
        OrderBy = ascending (No);
        Caption = 'Items By Location';
        QueryCategory = 'Item List';
    
        elements
        {
    
            dataitem(Item; Item)
            {
                column(No; "No.")
                {
                    Caption = 'No.';
                }
    
                column(Description; Description)
                { }
    
                dataitem(Item_Ledger_Entry; "Item Ledger Entry")
                {
                    DataItemLink = "Item No." = Item."No.";
    
                    column(Location_Code; "Location Code")
                    {
                        Caption = 'Location Code';
                    }
    
                    column(Remaining_Quantity; "Remaining Quantity")
                    {
                        Caption = 'Remaining Quantity';
                        Method = Sum;
                    }
                }
            }
        }
    
        trigger OnBeforeOpen()
        begin
    
        end;
    }

    Thanks.

    ZHU

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,524 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,493 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans