diff --git a/lms/lms/doctype/lms_certificate/lms_certificate.js b/lms/lms/doctype/lms_certificate/lms_certificate.js index 6a341a63..8d6f5e12 100644 --- a/lms/lms/doctype/lms_certificate/lms_certificate.js +++ b/lms/lms/doctype/lms_certificate/lms_certificate.js @@ -2,7 +2,7 @@ // For license information, please see license.txt frappe.ui.form.on('LMS Certificate', { - onload: function (frm) { + onload: (frm) => { frm.set_query("member", function (doc) { return { filters: { @@ -10,5 +10,8 @@ frappe.ui.form.on('LMS Certificate', { } }; }); + }, + refresh: (frm) => { + if (frm.doc.name) frm.add_web_link(`/courses/${frm.doc.course}/${frm.doc.name}`, 'See on Website') } });