I am just starting to do Custom Script, and I can´t find out what is wrong. I tried for times like this:

cur_frm.add_fetch(‘employee’, ‘employee_name’, ‘nombre_completo’)
cur_frm.add_fetch(“employee”, “employee_name”, “nombre_completo”)

The field nombre_completo is “Read Only” and in “Option” I write employee.employee_name. Someone can help me???

Can you add a little more detail of your problem? Did you define what triggers the fetch?

Something like this:

frappe.ui.form.on("DOCTYPE NAME", "employee", function(frm) {
    cur_frm.add_fetch('employee', 'employee_name', 'nombre_completo');


Thanks! I tried like this, but did not work:

frappe.ui.form.on(“project”, “employee”, function(frm) {
cur_frm.add_fetch(“employee”, “employee_name”, “nombre_completo”);


Try using a capital letter in Project.

Is this all in the main Doctype or are you using a child table?

Are you going into Administrator / Reload to make sure the script is called?

In the main Doctype, into Administrator, Reload each time, still do not work…I tried both; " and '.

Is “employee” a link field?

Are you trying to do something like this:

frappe.ui.form.on("Project", "employee",
function(frm) {{
        "method": "frappe.client.get",
        args: {
            doctype: "Employee",
            name: frm.doc.employee
        callback: function (data) {
                frm.docname, "nombre_completo",

Thank you very much!! I works!!