I'm trying to create a page where users will choose a Document Number/ Line from Purchase Line archive, but the table will only allow them to choose the latest version no.
I have tried the code below, but intellisense doesn't like it and the code doesn't compile. Does anyone know how I can achieve this?
Thanks :)
table 53104 "New Table"
{
DataClassification = ToBeClassified;
fields
{
field(1; "Entry No."; Integer)
{
AutoIncrement = true;
Editable = false;
}
field(2; "Document No."; Code[20])
{
TableRelation = "Purchase Line Archive"."Document No." where("Document Type" = filter('Order'), "Version No." = filter(max("Version No.")))
}
}
keys
{
key(PK; "Entry No.")
{
Clustered = true;
}
}
}