In hooks.py I have an app wide link to custom js
app_include_js = "/assets/custom/js/custom.js"
And in custom.js I have code which triggers when the ‘Account’ form is loaded:
frappe.ui.form.on('Account', {
onload: function(frm) {
frappe.show_alert({
message: "Account form is loaded!",
indicator: 'green'
}, 5);
}
});
so far so good. This all works. HOWEVER when I use the same technique to try to hook in to the load event of a workspace it doesn’t fire. So this:
frappe.ui.form.on('CustomWorkspace', {
onload: function(frm) {
frappe.show_alert({
message: "Workspace form is loaded!",
indicator: 'green'
}, 5);
}
});
doesn’t fire when the workspace is displayed
Is it possible to hook into a workspace page in the same way? If so how is this done?