added an important note to guarantee functionality when fetching values from other DocTypes:

Tropicalrambler
2017-11-24 21:37:26 -06:00
parent 1eb0c3531e
commit 7a51007ce6

@@ -103,6 +103,8 @@ frappe.ui.form.on("DocTypeB", "Trigger", function(frm) {
***
### Fetch fields from another DocType into a child table
This script takes data from another DocType source field and copies it onto a target field within the Child table in the current form or document (when you are editing it or on refresh). This is useful for pulling custom fields in Item DocType unto Sales Invoice Item, Purchase Receipt Item, etc.
**Important**: Make sure that the field Types as defined in the Customize Form or Custom Field, match for both the Source and the Target DocTypes!
```
frappe.ui.form.on("[PARENT_DOCTYPE_TARGET]", "refresh", function(frm) {
frappe.ui.form.on("[CHILD_TABLE_TARGET_DOCTYPE]", {