Query fields from a link field

frappe.db.get_list(‘ToDo’, fields=[‘name’, “allocated_to.full_name as user_fullname”])


why is it not working ?

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!

2 Likes

Hi NCP
You do not understand my question. I just try to test this fucntion of frappe:
Picture as below:


Can you suggest some solution to fix it.

Please apply and check it.

frappe.db.get_list('ToDo', fields=['name', 'owner.full_name as full_name'])
1 Like

i tried, but it is not working

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