SalesLine.SETRANGE("Document Type", SalesLine."Document Type"::Order); SalesLine.SETRANGE(Type, SalesLine.Type::Item); SalesLine.SetFilter("No.", '= %1', SourceItemNo); SalesLine.SetFilter("Blanket Order No.", '= %1', BlanketSalesLine."Document No."); SalesLine.SetFilter("Blanket Order Line No.", '= %1', BlanketSalesLine."Line No."); SalesLine.SetFilter("No.", '= %1', SourceItemNo); SalesLine.SetFilter("Quantity Shipped", '= 0'); // take a copy of these (in a temp table?) - STUCK HERE // repeat until over filtered sales lines // compare COPY of original lines with data in update lines
Answers
Variable CopySalesLine - temp Sales Line record
if SalesLine.findset then
repeat
CopySalesLine.Copy(SalesLine);
CopySalesLine.INSERT
until SalesLine.next = 0;