Fetch an image from another doc

Hi guys,
How I can fetch an image from an already saved doc to other new doc to be visible once I select a docname from a link field that refers to the first doc. I already used: cur_frm.add_fetch(“docfield name”,“image”,“image”); and it didn’t work, any advice please?

Hi check this out https://frappe.github.io/frappe/user/en/tutorial/form-client-scripting.html

What is docfield name?? It has to be doctype. Say like
cur_frm.add_fetch("customer", "image", "image" );

1 Like

its a link field that refers to Asset doctype and its name is asset and I already tried what u wrote above like: cur_frm.add_fetch(“asset”, “image”,“image”); and it didn’t fetch the image to my form.