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

Notifications

Announcements

No record found.

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 54

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,397 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
    54 on at

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

  • Suggested answer
    DAnny3211 Profile Picture
    11,397 on at

    hahaah

    it happens to everyone !!!

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,226

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,047 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,257 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans