A DocType is the core building block of any application based on the Frappe Framework.
It describes the Model and the View of your data. It contains what fields are stored for your data, and how they behave with each other. It contains information about how your data is named. The forms like Sales Order, Sales Invoices, Work Order are added as DocTypes in the backend.
DocType allows you to insert custom forms in ERPNext as per your requirement.
Read DocType documentation for more understanding.
To create a new DocType, go to:
Setup > Customize > Doctype > New
1. How to create a New DocType
- Name: Enter the name of the new DocType.
- Module: Enter which module would you like the new DocType to be added to.
1.1. Additional Details
- FieldsYou can choose to add as many fields as you want. The Label, Field Type, Mandatory Fields and other associated Options can also be added here. Learn more about field types here.
- NamingHere you can choose if you would want each of your forms within this DocType to be named automatically. As given in the description, you can select the pattern for naming of the forms. The same can be a Field within the DocType, Naming Series, Prompt, A defined Naming Series, or a Format based Name. For Naming, you can also add a Description and the Name Case (as a Title Case or UPPER CASE)for your convenience.
- Form SettingsAdditional Settings for the Form, Image Fields, Attachments, Timeline etc. can be configured here. To know more about Form, visit Customize Form.
- View SettingsHere, you can define the View settings for the DocType, like, Search Fields, Default Sort Field, Default Sort Order etc.
- Permission RulesYou can define the Permission Rules for the DocType here, and configure which users would be able to use or make changes to this DocType. Learn more about Users and Permissions here.
- Web ViewYou can select whether you would want a Web View of this DocType or no. Having a Web View for a DocType will allow your website users to have access to the Forms. Feel free to learn more about Website Users.
1.2. More Properties
- Is Submittable: You can select if you want this DocType to only be ‘Saved’ or to also be ‘Submitted’ by checking and un-checking this box.
- Is Child Table: You can define if you want the New DocType to be a Child Table within another DocType. Checkout Child Table for more information.
- Is Single: If checked, this Doctype will become a single form, like Sales Order, which user will not be able to re-produce. For e.g., Selling Settings in Sales Module is a Single DocType.
- Is Tree: A few DocTypes in ERPNext are structured as Trees, wherein there are some Parent DocTypes and some Children DocTypes. E.g., Doctype Company is structured as Tree, there are Parent Companies as well as Child Companies, which we call subsidiaries. If you want your DocTypes to be structured similarly, you can enable this option.
- Quick Entry: You can select if you want a Quick Entry to be made for this DocType. This will allow you to enter only a few mandatory details and save the DocType, so that a Quick Entry is made. For example, check Quick Entry in Journal Entry.
- Track Changes: You can select this option if you want to maintain a log of the changes made to each Form. Check Out Document Versioning for more understanding on this.
- Track Seen: You can select this option if you want to maintain a log of all the Users who have seen this Form.
- Track Views: You can select this option if you want to maintain a log of all the times each User has Viewed this Form.
- Custom?: This field will be checked by default when adding Custom Doctype. Similarly, if you are customizing a DocType which already exists in the system, this field by default would be unchecked.