Set value of Another doctype

I was trying to update a field in Doctype B based on child_table_a in Doctype A

here are the steps I did:

frappe.ui.form.on("Doctype_A", {
			  refresh: function(frm,cdt,cdn) {
				 var d = locals[cdt][cdn];

				frm.add_custom_button(__("Update"),
				  function() {
					frappe.call({
					  "method": "frappe.client.set_value",
					  "args": {
						"doctype": "Doctype_B",
						"name": d.child_table_a_link,
						"fieldname": {
						  "Doctype_B_field_1": frm.doc.field_1,
						  "Doctype_B_field_2": frm.doc.field_2
						},

					  }
					});
				});


			  }
			});