web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Extending or add the field to query page

(0) ShareShare
ReportReport
Posted on by 240

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

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    101,359 Super User 2026 Season 1 on at

    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

  • LearnBC Profile Picture
    240 on at

    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
    101,359 Super User 2026 Season 1 on at

    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
    240 on at

    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;

                }
            }
        }

       
    }

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,024 Super User 2026 Season 1

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,024 Super User 2026 Season 1

#3
YUN ZHU Profile Picture

YUN ZHU 1,383 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans