How can I make a link field depend on another link field where the value of the main field works as a filter for the other field

a field from customer doctype which is tax id then will link to sales invoice together with customer name

@dennis,

You will need to add the get_query in custom script for the field tax_id.

e.g.

cur_frm.fields_dict.tax_id.get_query = function(doc) {
	return {
		filters: {
			customer: doc.customer
		}
	}
}

Thanks,
Makarand

2 Likes

just adding that query?

custom script for customer? or for sales invoice?

@dennis,

You will need to add the custom script for the Sales Invoice.

Thanks,
Makarand

Thank you Sir :slight_smile: