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