What is `Custom?` in DocTypes

Hello Everyone,

Can someone please explain the Custom? flag that exists in the DocType?

Screenshot from 2024-09-24 14-28-59

Also, how does the system handle database migrations when a DocType is flagged as Custom?

@mohammad-ihraiz check this What is Custom? and Beta checkbox in DocType Settings

1 Like

Thank you for your reply.

The attached post answers part of my question, but I still can’t figure out how database migrations handle custom Doctypes. Will they be affected? What if a new Core DocType has the same name as the Custom DocType?

If the “Custom” flag is marked, the DocType is treated as a custom one and is stored directly in the database, meaning it will not receive updates or changes from Frappe/ERPNext core updates.

If the “Custom” flag is not marked, then the DocType is part of the core system or a custom app, and it is stored in the app or custom app, making it subject to updates and changes during Frappe/ERPNext updates.

2 Likes

When creating a new DocType in Frappe:

  1. If Custom? is checked:

    • The DocType is created directly in the database.
    • It doesn’t generate any files in the app’s directory structure.
  2. If Custom? is not checked:

    • A JSON, py, js files for the DocType is created in the app’s directory.
    • The file is placed in the doctype folder of the selected Module.

This distinction affects where the DocType definition is stored and how it’s managed in your Frappe application.