Doctype form explanation

Hi metha,

thanks for the explamation, and how about generating names?, is there any function to do that?..i want to inserting values to another table when a doctype is submited, so i need to generate the name field.

and for inserting we still wil use frappe.db.sql function right?

thanks