Dynamics NAV 2018 - Add column to page

I’m trying out Extensions 2.0 with Dynamics NAV 2018. I’ve managed to successfully add a table extension with two fields.

tableextension 50001 SalesShipExt extends "Sales Shipment Line"
{
    fields
    {
        // Add changes to table fields here
        field(50001;VehicleRegNo;Text[10])
        {
            trigger OnValidate();
            begin

            end;
        }
        field(50002;ShipmentNo;Text[10])
        {
            trigger OnValidate();
            begin

            end;
        }
    }

    var
        myInt : Integer;
}

My problem is now making these fields visible on pages. Below is what I have but I keep getting errors that VehicleRegNo does not exist in the current context. Why would this be the case?


pageextension 50002 PostedSalesShipExt extends "Posted Sales Shipment"
{
    layout
    {
        // Add changes to page layout here
        addlast(Content)
        {
            repeater(Lines)
            {
                field("Vehicle Registration No"; VehicleRegNo)
                {
                    trigger OnValidate();
                    begin
                    end;
                }
            }
        }
    }

    actions
    {
        // Add changes to page actions here
    }

    var
        myInt : Integer;
}

Hi Links,

You extended the Sales Shipment Line table. But you are trying to add them to the Posted Sales Shipment page.

If you check this page, then you will see that it is not using the Sales Shipment Line table, but the Sales Shipment Header.

So you need to extend the Posted Sales Shpt. Subform page instead.