How can i create new custom field through json file

i have created a doctype in Qutation.json , but its not reflecting in fields.

{
“fieldname”: “ep_test”,
“fieldtype”: “text”,
“label”: “ep test”,
“options”: “eP Conditions”,
“permlevel”: 0,
“print_hide”: 1,
},

You have to change modified value and then run bench frappe --latest.

But why you are directly changing json, you can add the field from UI, it will automatically be reflected in json, if developer_mode is set to 1 in site_config.

If you want to add a custom field in existing doctype, you can create Custom Field record.

1 Like

oke, if i added a new field from UI, it will be appear in JSON?? in database am able to see the fields. but in doc i didn’t see any changes.

As I said you have to set developer_mode as 1, in your site’s site_config.json file.

yes. i diid.

It should work, if you directly add a field in the doctype, it should be appeared in json file. Ensure that you have changing in right file, in right branch and in right site.

1 Like

i just printed the status in list view, thats working fine. but the custom filed is not getting from doc type.

You have to include the field_name in quotation_list.js file.

1 Like

How can I create new custom field through .json file?

Why not just use Customize Form?

Editing the multiple .json files will be faster if i want to create same field in multiple files than using Customize Form.

Use the Import tool to export the custom field .csv, make your fields, and import. Probably the fastest way.

Here’s a blank template:

thank you

Hi all,

I tried adding a field to the Employee form by editing employee.json but the field doesn’t show up on the site. When I add the field from the UI, I don’t see it in the employee.json file. The reason it’s important for me is simply because this new field is supposed to be part of the Pull Request for a proposed new feature

How to proceed?

Thanks

Still hoping for some assistance here… :slight_smile:

Thanks

Have you tried to change the “modified by” field and run bench migrate ?

Hi @chdecultot

Thanks a lot for your response. Could you please explain what you mean by this?

When you do bench migrate the system will update the database based on your JSON file only if the “modified” (sorry not “modified by”) field has changed since the last update.

Oh, I see!

Thanks a lot for this. I’ll try it and let you know how it goes

Hi @chdecultot

Thanks a great deal… it worked!

Kind regards,