Hi Mitesh,
That was not the recommended way to add fields to an existing DocType.
To add custom fields, Custom Field Form can be used.
Since you had added fields directly to doctype, whenever we push a
schema update, your changes will get lost.
The fields may have been lost, but the columns do not get deleted and
your data still exists in the database.
In your case, I recommend that you add the fields you lost as Custom
Fields and not directly to the DocType.
If you still want to add custom fields directly to DocType, you can do
so, at the cost that you will have to resolve merge conflicts. To
enable you to add fields to DocType directly,
1. In conf.py, set, developer_mode = 1
2. Now, create fields in the DocType and save the form.
3. On save, since developer_mode is 1, it will update the schema to
the file system in the doctype's .txt file.
4. Now, whenever we make changes to the schema, we also update the
.txt file for that doctype. Hence, you will need to manage the merge
conflicts on your own. We wouldn't be able to give any help on that
front.
I would recommend going with the Custom Field option. Its hassle free.
Thanks,
Anand.
> --
> You received this message because you are subscribed to the Google Groups
> "ERPNext Developer Forum" group.
> To view this discussion on the web visit
>
https://groups.google.com/d/msg/erpnext-developer-forum/-/23myNXH6VbYJ.