I know there is a setting in doctype.json for is_virtual, but I am curious if it’s possible to have a DocType that can be virtual or non-virtual based on a setting in the app.
For instance, suppose the I want to give the user option to set the custom doctype to either get the data via API (a virtual doctype) or to actually have the data live in their Frappe database (non virtual doctype).
If the DocType is set to non-virtual, then a scheduler task will run to manually import the data into the database. If they set it to virtual, then the data won’t be imported and the data will be fetched via API.