page 80140 "API Sales Order"
{
PageType = API;
APIVersion = 'v1.0';
APIPublisher = 'bcAPI';
APIGroup = 'Sales';
EntityCaption = 'SalesOrder';
EntitySetCaption = 'SalesOrder';
EntityName = 'salesOrder';
EntitySetName = 'salesOrder';
ODataKeyFields = SystemId;
SourceTable = "Sales Header";
Extensible = false;
DelayedInsert = true;
layout
{
area(content)
{
repeater(Group)
{
field(orderId; Rec.SystemId)
{
Caption = 'Id';
Editable = false;
}
field(documentType; Rec."Document Type")
{
Caption = 'Document Type', Locked = true;
}
field(docNo; Rec."No.")
{
Caption = 'Document No', Locked = true;
}
field(customerNo; Rec."Sell-to Customer No.")
{
Caption = 'Customer No', Locked = true;
}
field(contactName; Rec."Sell-to Contact")
{
Caption = 'Contact Name', Locked = true;
}
field(orderDate; Rec."Order Date")
{
Caption = 'Order Date', Locked = true;
}
field(documentDate; Rec."Document Date")
{
Caption = 'Document Date', Locked = true;
}
field(postingDate; Rec."Posting Date")
{
Caption = 'Posting Date', Locked = true;
}
field(externalDocNo; Rec."External Document No.")
{
Caption = 'External Document No.', Locked = true;
}
field(yourReference; Rec."Your Reference")
{
Caption = 'Internal Reference No', Locked = true;
}
part(salesOrderLines; "API Sales Order Lines")
{
Caption = 'Order Lines';
EntityName = 'salesOrderLine';
EntitySetName = 'salesOrderLines';
SubPageLink = SystemId = field(Id);
// SubPageLink = "Document Type" = field("Document Type"), "Document No." = field("No.");
}
}
}
}
page 80141 "API Sales Order Lines"
{
PageType = API;
APIVersion = 'v1.0';
APIPublisher = 'bcAPI';
APIGroup = 'Sales';
EntityCaption = 'SalesOrderLine';
EntitySetCaption = 'SalesOrderLines';
EntityName = 'salesOrderLine';
EntitySetName = 'salesOrderLines';
ODataKeyFields = SystemId;
SourceTable = "Sales Line";
Extensible = false;
DelayedInsert = true;
layout
{
area(content)
{
repeater(Group)
{
field(salesLineid; Rec.SystemId)
{
Caption = 'Id';
Editable = false;
}
field(documentType; Rec."Document Type")
{
Caption = 'Document Type', Locked = true;
}
field(docNo; Rec."Document No.")
{
Caption = 'Document No', Locked = true;
}
field(docLineNo; Rec."Line No.")
{
Caption = 'Document Line No.', Locked = true;
}
field(lineType; Rec.Type)
{
Caption = 'Line Type', Locked = true;
trigger OnValidate()
begin
if Rec.Type <> Rec.Type::Item then
Error('Line Type must be Item');
end;
}
field(lineTypeNo; Rec."No.")
{
Caption = 'Line Type No.', Locked = true;
}
field(lineDescription; Rec.Description)
{
Caption = 'Line Description', Locked = true;
}
field(unitMeasure; Rec."Unit of Measure Code")
{
Caption = 'Unit of Measure Code', Locked = true;
}
field(quantity; Rec.Quantity)
{
Caption = 'Quantity', Locked = true;
}
field(unitPrice; Rec."Unit Price")
{
Caption = 'Unit Price', Locked = true;
}
}
}
}
}
When