Hi,
i have created 2 Pages for Deep insert. If i want get the entries over expand in the Url i get the following error:
Can't find the proberty SalesLine on type 'NAV.SalesOrder'
Here are the pages. Where is my mistake?
URL SalesOrder?$expand=SalesLines
Without expand it works only on SalesOrder API
page 50110 "Doc"
{
PageType = API;
Caption = 'Doc';
APIPublisher = 'Doc';
APIGroup = 'Flow';
APIVersion = 'v1.0';
EntityName = 'Doc';
EntitySetName = 'Docs';
SourceTable = header;
DelayedInsert = true;
layout
{
area(Content)
{
repeater(Docs)
{
field(id; id)
{
Caption = 'id';
ApplicationArea = All;
}
field(name; name)
{
Caption = 'name';
ApplicationArea = all;
}
field("DateTime"; "Date/time")
{
Caption = 'datetime';
ApplicationArea = All;
}
part(SalesLines; SalesLines)
{
Caption = 'SalesLines', Locked = true;
EntityName = 'SalesLine';
EntitySetName = 'SalesLines';
ApplicationArea = All;
}
}
}
}
trigger OnInsertRecord(BelowxRec: Boolean): Boolean
begin
Insert(true);
exit(false);
end;
trigger OnDeleteRecord(): Boolean
begin
Delete(true);
end;
}
page 50111 SalesLines
{
Caption = 'SalesLines';
PageType = ListPart;
DelayedInsert = true;
SourceTable = Lines;
layout
{
area(Content)
{
repeater(General)
{
field(lineno; lineno)
{
Caption = 'lineno';
ApplicationArea = All;
}
}
}
}
}