Merge pull request #38506 from safwansamsudeen/fix-file-attachments-link

fix: attachments file link incorrect
This commit is contained in:
Ejaaz Khan 2026-04-09 14:08:51 +05:30 committed by GitHub
commit 4d1aaf5932
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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
)}`
);
}
},