# ERROR #5002 - GL Account delete

Deleting a General Ledger Account,

General Ledger account is used in the custom item cost of sales

<table border="1" id="bkmrk-error%3Aerror-100-%C2%A0err" style="border-collapse: collapse; width: 100%;"><colgroup><col style="width: 99.8765%;"></col></colgroup><tbody><tr><td>Error:Error 100 ERROR #5002: ObjectScript error: <span style="background-color: rgb(251, 238, 184);">Stock Code 6849</span> uses this account in the Inventory Item setup as the <span style="background-color: rgb(251, 238, 184);">Custom Item - Cost of Sales account</span> and cannot be deleted.</td></tr></tbody></table>

[![image.png](https://hugeerp10.co.za/hsofmanual/uploads/images/gallery/2023-10/scaled-1680-/vFCimage.png)](https://hugeerp10.co.za/hsofmanual/uploads/images/gallery/2023-10/vFCimage.png)

---

Go to the stock item 6849 and change General Ledger before deleting.

[![image.png](https://hugeerp10.co.za/hsofmanual/uploads/images/gallery/2023-10/scaled-1680-/Iocimage.png)](https://hugeerp10.co.za/hsofmanual/uploads/images/gallery/2023-10/Iocimage.png)