How define field as default in doctype


I have one query in doctype ?

Which way i make a default field in doctype. My doctype is selected with single doctype.

Eg : Buying settings is one single doctype and in that how “Supplier Naming By” is taken as default field. As
default field and it’s value are stored in tabDefaultvalue in database. But i don’t know that which way i taken field as a default in a particular doctype. so please assist me about default field.

Harsh Mehta

1.Go to Doctype Option->add the option(list).
2.Go to Display->Default->Value.

Sagar Shiragawakar
New Indictrans Technologies Pvt. Ltd.

Hello Sagar,

I didn’t found option you have suggested. Can you please Explain in depth.

Harsh Mehta

If fieldname of DefaultValue matches the field in the document, it will be taken as default.


Not understand. Please assist me in depth.

This is a community forum. I hope someone can help you.

Thanks @rmehta. See who can help me.

When you “Add A New Row” to a Doctype you get a pop up window where you choose your field settings etc.
At the lower left of this pop up you can enter a value into the “Default” field.
This will become the default.

1 Like

Actually this doesn’t need to be done within the doctype at all. Here’s an alternative:

Go to customize form. It’s in the menu of the document list of the doctype you are trying to change, on the top right.

once you are in customize form, scroll to the field that you are trying to change the default value of.

click on that field, and a menu should pop up. scroll to the bottom of the menu, and you should see a default box. Type in the value that you want that field to have by default. If the field is a select field, then you will need to make sure that the value in the default box matches the option you want selected.

This picture shows the default box:


@System19 and @Christopher_Gregory_

thanks for your quick reply but whatever you guys are suggested is about default value of particular that field. And my question was about how default field was considered in particular doctype form.

Thanks & Regards,
Harsh Mehta

From what I understand that you are wanting to know. A Doctype when created has the ability to be named in several ways. Either by a naming series like CUST-#####1, CUST-#####2, CUST-#####3 etc etc. Or by a chosen field within the Doctype. Like using the Customer Name “customer_name” field in the Customer Doctype. For example this would create Customer Doctypes like: John Smith, Jane Smith, Rob Jones, etc etc. Each Doctype is different. For example, Sales Order is named by a naming series SO-#####1, SO-#####2, SO-#####3 etc etc. You can see how each Doctype is named by going to Doctype List and selecting the Doctype. Then check Naming, Auto Name at the bottom left of the page.
Hope That Helps.

@ System19 Please understand my question that i was asked.

The “Buying Settings” Doctype allows you to choose either a Naming Series OR a Supplier Name as your default field. Chances are you would choose “Supplier Name” as you are unlikely to have two suppliers with the same name and this makes things easy.
If you did want to use a Naming Series instead for example SUP-####1, SUP-####2 etc etc then choose Naming Series in your “Buying Settings”.
Then go to your “Naming Series” Doctype and choose SUP- as your prefix. Click update.
You can locate “Naming Series” Doctype by using the search box at the top of the desktop page.
Either way You have now set your default.
Hope That Helps