That depends on your definition of "empty". Do you want to delete all Sales Headers without sales lines?//TODO Salesline.setrange("Document Type",SalesHeader."Document Type"); Salesline.setrange("Document No.",SalesHeader."No."); if SalesLine.isempty then SalesHeader.Delete;
Answers
Yes, they are to be deleted entirely. Thank you for your answer!