I want to fetch Contacts to another Custom DocType, I have fetched Address to my Custom DocType, but I am confused about this one, Here is the code for fetching the Address one:
frappe.ui.form.on("IT Consultant", "new_address", function(frm, cdt, cdn) {
if(frm.doc.new_address){
return frm.call({
method: "frappe.contacts.doctype.address.address.get_address_display",
args: {
"address_dict": frm.doc.new_address
},
callback: function(r) {
if(r.message)
frm.set_value("full_address", r.message);
}
});
}
else{
frm.set_value("full_address", "");
}
});