Disallow Rename field

Hello Everyone,

In any doctype if I want to disallow rename fuction than how it can be done?

Thanks in advance

Hi @Foram In which document you are trying this ?

Create a property setter (like this one for Item DocType):

   "creation":"2022-11-22 19:33:26.977825",
   "modified":"2022-11-22 19:33:26.977825",
   "doctype":"Property Setter"

Hello @Foram [For custom Doctype only]
First you would have to enable developer mode
you can do that by simply adding this line of code in you ./bench/sites/your_site/site.config.json file

 "developer_mode": 1,

Next open the list page of any doctype and above there when you click on three dost you can see “Edit doctype” option
Once you clikc on that go below and you can see this check box Rename doctype

Just uncheck that
later you can remove the line you added in your site_confif.json file

@Harsh_Magiya @Foram

You should avoid doing this for core doctypes of frappe / erpnext as it will broke upcoming version upgrade, there are alternate solutions available.

Manual creation of property setter is one of them.

1 Like

I want to disallow the renaming of item doctype without developer mode on.

Can you brief it what you are saying for disallowing the renaming of item doctype?


Add this values in property setter. it will work for you