Dynamics NAV 2018 - 添加列到页面

Dynamics NAV 2018 - Add column to page

我正在使用 Dynamics NAV 2018 试用 Extensions 2.0。我已经成功添加了一个包含两个字段的 table 扩展。

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;
}

我现在的问题是让这些字段在页面上可见。以下是我所拥有的,但我不断收到 VehicleRegNo 在当前上下文中不存在的错误。为什么会这样?

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;
}

问题是您已将字段添加到行 table,但将字段添加到附加到页眉 table 的页面。如果您使用 "Posted Sales Shpt. Subform" 作为您的页面,它应该会找到这些字段。