frappe_docs
frappe_docs copied to clipboard
Better documentation on the "Fetch From" doctype row option
When using a "select" type in DocType1 to pull in the name of another Doctype2.
We often want to collect other information from Doctype2 via the "Fetch From" feature.
The correct use of "Fetch From" is to use the "name" of the Doctype1 select field populated and not the name of the source Doctype ie
- stratigic_intent.period_version is wrong and will return no results
- intent.period_version is correct and will work
This is not clear from the examples/documentation on the net. In many examples the DocType1 field name is the same as the docType2 doc name, this will always work but that's more good luck than knowledge.
Related docs: https://frappeframework.com/docs/user/en/guides/app-development/fetch-custom-field-value-from-master-to-all-related-transactions
Source: https://github.com/frappe/frappe_docs/blob/master/frappe_docs/www/docs/user/en/guides/app-development/fetch-custom-field-value-from-master-to-all-related-transactions.md
Hi thanks. Found those docs, the issue for me was the "field" name link in my app was different from the source docType name. In the examples, they are both the same.
Great! Feel free to edit the docs, create a PR and request a review from me.