Realtime Data for changing a field

I am having a select-type field category and I want data from another doctype on change of this field.

This is what I have tried so far

'method': 'frappe.client.get_list',
        'doctype': 'Morning Updates',
        'fields': service,
	'filters': {'category':cur_frm.doc.category}
        async: false,  
        callback: function(r)


For first time it is giving the list, but let say I accidently selected another option and now want to select the right field, then for second time it is giving error.

What is the error?

expected stringtype or buffer

Can you share the full trace? That will help the community help you faster.

Just figured it out, I was having conflict in field name ambiguity.

Thanks btw @RohanB

Thanks for posting the answer :+1: