How to distinguish system doctypes from custom doctypes?

When fetching all doctypes, is there a way to distinguish system doctypes(like User) from user created custom doctypes?

 frappe.get_all('DocType', fields=['*'], filters={'name': 'User'})[0]

 frappe.get_all('DocType', fields=['*'], filters={'name': 'Custom'})[0]

I tried to look at the fields of doctypes but couldn’t find any.

There’s a field called Custom which differentiates standard ones:

1 Like

When creating a doctype, if custom field is checked, frappe doesn’t create doctype files(doctype.js, doctype.py etc).

Since these files are needed for customisation, users have to uncheck custom field?

For custom doctype, these customizations can be done using Custom Script and Server Script doctypes.

1 Like

Custom doctypes are loaded directly in the Database compared to standard doctypes where the schema is controlled via JSON, and the custom fields go to the db.

Rest is what @pateljannat said.

1 Like

Is there a way to distinguish system doctypes(doctypes that are created by erpnext) from user created doctypes(after erpnext installation, users can create their own doctypes)?

These will generally have Administrator has the creator.

1 Like

Each doctype must belong to a module, and each module must belong to an app. For non-custom doctypes, you can identify which app a doctype belongs to by fetching module details.

1 Like