14. Januar 2019 17:13
// Default to Item for the first line and to previous line type for the others
IF ApplicationAreaSetup.IsFoundationEnabled THEN
IF xRec."Document No." = '' THEN
Type := Type::Item;
14. Januar 2019 17:31
14. Januar 2019 18:19
IF Rec."Document No." ='' THEN BEGIN
Rec.Type := Rec.Type::Item
END ELSE BEGIN
locSalesLine.SETRANGE("Document Type", Rec."Document Type");
locSalesLine.SETRANGE("Document No.", Rec."Document No.");
IF NOT locSalesLine.FINDFIRST THEN BEGIN
Rec.Type := xRec.Type::Item
END;
END;
14. Januar 2019 19:54
IF xRec."Document No." = '' THEN BEGIN
Type := Type::Item;
UpdateTypeText;
END;