delete_master
Delete TallyPrime masters by exact name: ledgers, groups, stock items, voucher types, units, godowns, cost centres. If used in a voucher being deleted, delete that voucher first and confirm success.
Instructions
Delete one or more masters (ledger, group, stock item, voucher type, unit, godown, cost centre, etc.) from TallyPrime by name. If a master was used in a voucher you're also deleting, delete the voucher first and confirm it succeeded before calling this — doing both in the same parallel batch can race (the master delete reaching Tally before the voucher delete has committed), confirmed live. If a ledger/stock item was used in both a Sales AND a Purchase item-invoice, it may return 'Cannot be deleted!' permanently even with no transactions left — this is fixed by running Company Data → Rewrite in Tally itself (confirmed live), not by retrying or sequencing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| names | Yes | Exact name(s) of the master(s) to delete | |
| collection | Yes | Type of master to delete, as Tally's XML tag name, e.g. 'LEDGER', 'GROUP', 'STOCKITEM', 'VOUCHERTYPE', 'UNIT', 'GODOWN', 'COSTCATEGORY', 'COSTCENTRE' |