Creating new docs

Continuing the discussion from Doctype form explanation:

To insert new docs, use frappe.get_doc and insert

Never use frappe.db.sql

Read this:


Thanks, this very useful, any way using insert i dont need to put the name , creted date, etc (columns that not defined in doctype but auto generated by frappe) right ?


Name, creation_date, created_by, modified_by etc will be added automatically by the system via insert() function.