frappe.db.get_list(‘ToDo’, fields=[‘name’, “allocated_to.full_name as user_fullname”])
why is it not working ?
frappe.db.get_list(‘ToDo’, fields=[‘name’, “allocated_to.full_name as user_fullname”])
Hi @T941,
In js use frappe call,
frappe.call({
method: 'frappe.client.get_value',
args: {
'doctype': 'User',
'filters': {'name': frm.doc.owner},
'fieldname': ['full_name']
},
callback: function(r) {
if (r.message) {
console.log("---------->",r.message.full_name);
}
}
});
Thank You!
Hi NCP
You do not understand my question. I just try to test this fucntion of frappe:
Picture as below:
Please apply and check it.
frappe.db.get_list('ToDo', fields=['name', 'owner.full_name as full_name'])
please check the field name of allocated_to
in ToDo Doctype Allocated to field name is owner.
I think the version frappe I’m using is too old to use this new feature.
Thank you so much