Script of party name

this script not work with supplier party


frappe.ui.form.on('Journal Entry Account', {
	party: function(frm, cdt, cdn) {
		var child = locals[cdt][cdn];
		if(! return;

		field_map = {"Supplier": "supplier_name", "Customer": "customer_name", "Employee": "employee_name", "Member": "member_name"};{
			method: "frappe.client.get_value",
			args: {
				doctype: child.party_type,
				fieldname: field_map[child.party_type],
				filters: { name: },
			callback: function(r, rt) {
				if(r.message) {
					frappe.model.set_value(cdt, cdn, "party_name", r.message[field_map[child.party_type]]);


this message is Appear

Wrong fieldname customer_name in add_fetch configuration of custom script

Continues here Party name script