How to delete the records of Address?


I have one query regarding Address Doctype in ERPNext.

I have different records of addresses in Address.

In that, Some addresses are linked with the customers and some are not.
So, I want to delete those addresses which are not linked with any customers or any other doctype.

There is not any menu or options available on that doctype to delete my addresses. Even cant see the checkbox in list view to select and delete that records like others.

So, How to delete that records?

@Chandresh_Thakkar Go to Customize Form > Address > Set Permissions. In There give Delete Permission to your User Role.

Just checked Address DocType nobody has permission to delete Address directly.
But there is code for it. It will be auto deleted on deletion of linked document.


Try with user permission or role permission.

Thank You.

Thank you for your suggestion. But if i want to delete only my address not the linked customer, then also this code will work?


Use role permissions or user permission for that.

Thank You.