delete_stock_item
Delete a stock item in TallyPrime once it has no posted transactions. Remove related vouchers beforehand; if deletion still fails, run Company Data Rewrite to resolve.
Instructions
Delete a stock item from TallyPrime. Fails if it has transactions posted against it. If deleting a voucher that used this item in the same turn, delete the voucher first and confirm it succeeded before calling this — doing both in parallel can race (confirmed live). If this item was used in both a Sales AND a Purchase item-invoice, it may return 'Cannot be deleted!' even with zero balance and no transactions left — fixed by Company Data → Rewrite in Tally itself (confirmed live), not by retrying.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Exact name of the stock item to delete |