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

Announcements

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

    hahaah

    it happens to everyone !!!

  • Suggested answer
    Amit Profile Picture
    2,563 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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May 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,344 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,742 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,231

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans