You have to add Code to delete Multiple Item base on condition
Below is the code, you can add some more filters based upon your conditions
CLEAR(Item);
Item.RESET();
Item.SETRANGE(Inventory,0);
IF Item.FINDSET THEN BEGIN
ItemLedgerEntry.RESET();
ItemLedgerEntry.SETRANGE(ItemLedgerEntry."Item No.",Item."No.");
IF NOT ItemLedgerEntry.FINDFIRST THEN
Item.DELETE(TRUE);
END;
Name DataType Subtype Length
Item Record Item
ItemLedgerEntry Record Item Ledger Entry