Create New Doctype With JSON

Can I create a DocType with JSON then update the database according to it ?

If so, How I can do that ?

  1. Login via administrator
  2. Set "developer_mode": 1 in your site_config.json
  3. Create a new DocType via the UI
  4. The JSON will be created automatically.
1 Like

That’s not what I mean.

I need to create DocType as copy from another one.

e.g: DocType2 is an exact copy from DocType1

You can use the inbuilt File -> Copy feature to copy an existing doctype. Then if you save it from administrator login and if you are in developer_mode then json will be automatically created.

Thanks.

That’s Exactly what I was looking for.