mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-12 17:23:38 +00:00
added an important note to guarantee functionality when fetching values from other DocTypes:
@@ -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]", {
|
||||
|
||||
Reference in New Issue
Block a user