Try ERPNext Buy Support Partners Foundation

Fetch data from Child Table to Parent Doctype Link field


I have a Parent Doctype called Forwarder with child Doctype Business Authorisation

I am trying to fetch Business Name from Business Authorisation child doctype to Transaction Doctype using a custom script. Instead, only the name appears in the dropdown.

This is my custom script

frappe.ui.form.on('Transaction', {
	refresh: function(frm) {
		frm.set_query("business", function(frm, cdt, cdn) {
			return {
				filters: [
					["parent", "=", frm.forwarder],
					["year", "in", [2020, 2021]]

There is no option to set search field in Business Authorisation child doctype

Please assist.