try
frappe.ui.form.on("YOUR DOC TYPE", {
refresh: function(frm) {
frm.timeline.insert_comment("Submitted", "Your Comment");
}
});
try
frappe.ui.form.on("YOUR DOC TYPE", {
refresh: function(frm) {
frm.timeline.insert_comment("Submitted", "Your Comment");
}
});