I’ve gone through many posts regarding frappe.get_doc() to insert child record. But i’m not sure how it works.
I have a parent doctype which contains a child doctype as a table grid.
I’ve developing a method to import child data to parent by columns (Horizontal), not row as the default Data Import tool (Vertical).
Ex: Employee | Base Salary | OT | Incentive | Allowance
EMP/001 | 500 | 50 | 70 | 900
Can anyone help to show how the dict data look like and how to insert data properly without using raw sql?
The screenshot shows that the child table doctype (Salary Component Data Table) atleast has a database table. Is Monthly Salary Component Data visible in the doctype list after creating it? Could you check if a similar backend table has been created for it through mysql?
Monthly Salary Component Data doctype would have a field for the child table doctype Salary Component Data Table. Replace “childtable_fieldname” by the name of that field in the code.