Skip to content

Adding Web Link in Sidebar

Screenshot showing web link in form view side bar

// Assuming there is a "Live Stream" DocType
// with a field `stream_link` that has the link to a YouTube video
frappe.ui.form.on('Live Stream', {
refresh(frm) {
const stream_link = frm.doc.stream_link;
frm.add_web_link(stream_link, "View in YouTube");
}
})