Good day,
I want to understand the use of the function frm.doc.__unsaved
1 Like
Hi, @imbra. Please check the below script
frappe.ui.form.on('Sales Invoice', {
refresh(frm) {
if (frm.doc.__unsaved){
frappe.throw(__("Please save the document "));
}
}
})```
2 Likes
Thank you