I want to create a field in the existing doctype through code level, rather than using UI.
Any suggestions to do the above requirement?
Thanks in Advance
I want to create a field in the existing doctype through code level, rather than using UI.
Any suggestions to do the above requirement?
Thanks in Advance
you can change the json file inside the doctype folder and then do bench build and restart . but I don’t recommend it .
@bahaou Thanks for your response.
If that’s not a recommended way, my use case was below scenario
We have two different sites with multitenancy mode. Both sites have the same doctype and fields. Admin adds a new field in the doctype (Site A), we need to do the same changes in Site B doctype through any scripts or something. without doing any manual work.
How do we achieve the use case?
Thanks in Advance
you can refer the guide below
Use create_custom_fields
function.