It looks like you're new here. Sign in or register to get started.
DocDim.RESET; DocDim.SETRANGE("Table ID",DATABASE::"Sales Header"); DocDim.SETRANGE("Document Type","Document Type"); DocDim.SETRANGE("Document No.","No."); DocDim.DELETEALL; DocDim.SETRANGE("Table ID",DATABASE::"Sales Line"); DocDim.DELETEALL; ApprovalMgt.DeleteApprovalEntry(DATABASE::"Sales Header","Document Type","No."); IF HASLINKS THEN DELETELINKS; DELETE; // <--------------------------------------------- ReserveSalesLine.DeleteInvoiceSpecFromHeader(SalesHeader); IF SalesLine.FINDFIRST THEN REPEAT IF SalesLine.HASLINKS THEN SalesLine.DELETELINKS; UNTIL SalesLine.NEXT = 0; SalesLine.DELETEALL; DeleteItemChargeAssgnt; SalesCommentLine.SETRANGE("Document Type","Document Type"); SalesCommentLine.SETRANGE("No.","No."); IF NOT SalesCommentLine.ISEMPTY THEN SalesCommentLine.DELETEALL; WhseRqst.SETCURRENTKEY("Source Type","Source Subtype","Source No."); WhseRqst.SETRANGE("Source Type",DATABASE::"Sales Line");
Comments
Are you looking for this? in Codeunit 80