Parent Child Relationship
All documents can have child documents, identified by the
Though child documents have their own DocType and database table, but are not to handled or viewed on their own. FrappeJS will automatically load child documents along with the parent when you use the
A sample parent-child records looks like this:
customer: "Harry Potter",
item: "Invisibility Cloak",
Child documents have special properties that define their relationship to their parent:
parent: name of the parent.
parenttype: DocType of the parent.
parentfield: Field in the parent that links this child to it.
idx: Sequence (row).
These properties are maintained in the table automatically by FrappeJS.