refactor: use framework function for form link

Co-authored-by: Suraj Shetty <13928957+surajshetty3416@users.noreply.github.com>
This commit is contained in:
Safwan 2026-02-25 14:30:47 +05:30 committed by GitHub
parent 63c256e066
commit 674734e5c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -47,9 +47,7 @@ frappe.ui.form.on("File", {
if (frm.doc.attached_to_name) {
const field = frm.get_field("attached_to_name");
field.$input_wrapper.find(".control-value").html(
`<a href="/desk/${frm.doc.attached_to_doctype}/${frm.doc.attached_to_name}" target="_blank">
${frm.doc.attached_to_name}
</a>`
`${frappe.utils.get_form_link(frm.doctype, frm.docname, true)}`
);
}
},