Manual guide for making a doctype

I want to know is there a guide to make a new doctype?


It is a manual guide but I think is not thorough explanation on making a new doctype. I need a thorough guide to tell me especially about the doctype field.

I found the manual, it is just like you referring to. I don’t find it cause I’m looking at the erpnext manual. I fount it on the article section:

I think you mean the DocField ?

1 Like

Yes, doc field is what I mean

I could not find any guide but there seems to be this link DocField - Frappe.

I think you wish to know more about the behavior of what each DocField property does right ?

One way is to experiment with the properties. However I will try and update some things I already know. I request other members to add some posts regarding this.

Yeah I found the explanation yesterday, but there’s still I don’t know about the customization on every field like what I must input on option section in the doc field.

I have used options in two context:

In case if the DocField is of type Link, then Options must contain a valid DocType (e.g. Sales Invoice or Employee).

Also, if certain fields are being fetched when a certain Link DocField will be selected, then Options should contain something like this <variable of linked field>.<corresponding field in linked doctype>. I’ll give you an example :-

Say in stock entry, I wish to fetch name of the Issuer without JS. This is what you will do:-

If we expand the rows, we find this :-


Employee is an actual DocType in ERPNext.

Similarly for employee name :

I hope you understand now.

I’ll setup a new instance and I’ll help you out with some more. Till then keep experimenting with them and you’ll come to know what those properties do. Also, if you explore code you will see that via JavaScript you can manipulate these values to your liking.

I think I understand now, I mistook by using the label and not the doctype name itself. That’s why I keep getting error. Thx @root13F for the explanation.

1 Like