Fetch data for fields

Hello,

I have one field in doctype which is option and base on option selected i have to display predefined options for other field and based on data on second field selection we have to fetch data for other fields :
scenario is like that based on primary or higher secondary selection we have to fetch standard number and based on standard number we have to display number of class for each standard likewise
i required help on how to achieve this.any help is appreciated.

Thanks
Hardik Gadesha

cur_frm.set_query("items", function(doc, cdt, cdn) {
	var d = locals[cdt][cdn];
	return {
		filters: {
			'item_code': d.item_code
		}
	}
});

Try something like this.

1 Like

Thanks @KanchanChauhan For your inputs.

Could you explain me in brief. How it’s actually work or flow of this task.

Thanks

Take a look at journal entry, here it is used couple of times, should give you an idea.

1 Like