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...
Answered

Page Extention - add field - error in Visual Studio Code AL

(0) ShareShare
ReportReport
Posted on by 56

Hello,

We are going online soon with Dynamics Business Central. Our Application Version is 21.1.48363.48789. Sandbox.
Trying to add an extra flowfield to Item List - "Qty. to Ship" from Sales Line.
Have created (my first ones) a table and a page extention in Visual Studio Code AL with the code below. 

Table extention works fine, I can add the field "Qty. to Ship" to Item List with Designer - would like to add the field with a page extention but it gives me error "The name "Qty. to Ship" does not exist in current context" 

Will be glad for help:)

Tableextension 50100 qtytoshipExt extends "Item"
{
    fields
    {
        field(50100; Qty_to_Ship; decimal)
        {
            Caption = 'Lever på ordre';
            DecimalPlaces = 0 : 5;
            Editable = false;
            FieldClass = FlowField;
            CalcFormula = Sum("Sales Line"."Qty. to Ship" WHERE("Document Type" = const(Order), Type = const(Item), "No." = field("No."), "Qty. to Ship" = FILTER(> 0)));
        }
    }
    var
        myInt: Integer;
}

pageextension 50100 pqtytoshipExt extends "Item List"
{
    layout
    {
        addafter(InventoryField)
        {

            field("Qty. to Ship"; "Qty. to Ship")
            {
                ApplicationArea = All;
                Caption = 'Lever på ordre';
            }
        }
    }

    var
        myInt: Integer;
}

I have the same question (0)
  • Verified answer
    DAnny3211 Profile Picture
    11,407 Super User 2026 Season 1 on at

    hi

    try this

    pageextension 50100 pqtytoshipExt extends "Item List"

    {

       layout

       {

           addafter(InventoryField)

           {

               field("Qty. to Ship"; Rec.Qty_to_Ship)

               {

                   ApplicationArea = All;

                   Caption = 'Lever pÃ¥ ordre';

               }

           }

       }

       var

           myInt: Integer;

    }

    your field's name is Qty_to_Ship , not "Qty. to Ship"

    check my answer if it helped you, thanks

    DAniele

  • Groefte Profile Picture
    56 on at

    ... need new glasses :) - thanks it is working.

  • Suggested answer
    DAnny3211 Profile Picture
    11,407 Super User 2026 Season 1 on at

    hahaah

    it happens to everyone !!!

  • Suggested answer
    Amit Profile Picture
    2,561 on at

    Hi,

    adding info

    https://erpconsultors.com/page-extension-overview-in-business-central-d365/

    Regards
    Amit Sharma
    www.erpconsultors.com
    Press Yes if Info is useful

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!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,965 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,125 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 961 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans