fix: attachments file link incorrect

This commit is contained in:
Safwan Samsudeen 2026-04-09 13:05:14 +05:30
parent 0122b49ef6
commit 9690ab10bd

View file

@ -48,7 +48,13 @@ frappe.ui.form.on("File", {
const field = frm.get_field("attached_to_name");
field.$input_wrapper
.find(".control-value")
.html(`${frappe.utils.get_form_link(frm.doctype, frm.docname, true)}`);
.html(
`${frappe.utils.get_form_link(
frm.doc.attached_to_doctype,
frm.doc.attached_to_name,
true
)}`
);
}
},