tally_delete_master
Preview deleting a TallyPrime master (group, stock item, etc.) by checking it's not in use; returns a confirmToken for user-approved write.
Instructions
Delete a group, cost centre, unit, stock group, godown, stock item, voucher type or budget from TallyPrime. For ledgers use tally_delete_ledger.
TallyPrime refuses to delete a master that is in use — a group with ledgers under it, a unit an item uses, an item with stock movements. That refusal comes back as WRITE_REJECTED and nothing changes.
WRITES TO TALLYPRIME, in two steps. This call only PREVIEWS: it checks the change against the live books and returns exactly what would be written plus a confirmToken — nothing is changed. Show the preview to the user, and only after they approve it call tally_confirm_write with the token. Never confirm on your own initiative, and never confirm a preview the user has not seen.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | Yes | ||
| name | Yes | The master to delete, by its exact name. | |
| company | No | Company name. Omit to use whichever company TallyPrime has loaded. If given and it is not the loaded one, the call fails with TALLY_COMPANY_NOT_LOADED rather than returning another company's data. |