neha
August 28, 2023, 12:21pm
1
How to Customize a Core Doctype ? Does anyone know ?please help
NCP
August 28, 2023, 12:52pm
2
Hi @neha ,
If you want to edit core doctype, then please enable the developer mode.
Developer Mode command:
bench --site [sitename] set-config developer_mode 1
bench --site [sitename] clear-cache
bench --site [sitename] clear-website-cache
bench --site [sitename] migrate
Then stop the bench and then again start the bench.
Then reload (Ctrl + Shift + R) and check it.
If you want to edit, change, or delete anything from the core doctype then please read the whole post. Then applying anything.
Hi @nilpatel42 ,
I understand that you may have specific requirements that involve deleting multiple standard fields. However, it is important to note that deleting standard fields can have unwanted results and may affect the functionality and integrity of the system. It disappoints deleting standard fields to ensure data consistency and avoid potential issues with future updates or upgrades.
Instead of deleting standard fields, it is recommended to follow customization guidelines, which allow …
I hope this helps.
Thank You!
3 Likes
Domino
June 27, 2024, 7:28am
3
HI @NCP i want to customize User doctype.but it is a core doctype,
so it is possible?
just i want to add a child table it has a list of projects.
neha
June 27, 2024, 7:29am
4
You can’t customize a user doc instead Use Edit Doctype option
@NCP @neha Can anyone explain me why we are unable to customize User doctype?
Is there any reason behind it?
NCP
July 10, 2024, 8:16am
6
You can customize the doctype with the “Edit DocType” option but you can’t customize the doctype using “Customize Form”…
@Kiranmai You can try one thing for adding fields in user Doctype.
→ Go to Custom Field Doctype.
→ Add a new entry in Custom Field where you need to fill field related properties like field type, field name and doctype and where you want to add in doctype (insert after).
→ After Saving the entry you can check in user doctype, it will be visible for you.
NCP
July 10, 2024, 8:31am
8
Hi @aashishvashisht6 ,
You can’t add the custom field in the below doctype.
core_doctypes_list = (
"DefaultValue",
"DocType",
"DocField",
"DocPerm",
"DocType Action",
"DocType Link",
"User",
"Role",
"Has Role",
"Page",
"Module Def",
"Print Format",
"Report",
"Customize Form",
"Customize Form Field",
"Property Setter",
"Custom Field",
"Client Script",
)
Reference:
You can customize the doctype but you can’t delete the field from the doctype or change the field type because
If you want to add the field then you can’t add it via custom field. because “Custom Fields cannot be added to core DocTypes”
You have to make a code for the add custom field in the core doctype when install the custom app.
reference:
@NCP it is possible to add directly in Custom Field Doctype in version-14 but for version-15 I am not sure Need to check.
NCP
July 10, 2024, 8:40am
10
Hi @aashishvashisht6 ,
Already tested. Please check it again in the latest version
@NCP My bad they have updated the version-14 but in earlier versions, it is allowed.