frappe.ready(function () {
// bind events here
frappe.web_form.delete = () => {
frappe.confirm('Are you sure you want to delete this document?',
function () {
// delete document
console.log('yes');
return true;
},
function () {
// do nothing
console.log('no');
return false;
});
}
})
Hi Shivam, @scmmishra
On web form, I would like user to confirm deletion before proceeding.
For that I have put above script in js of web form.
When user says yes, in console i do get ‘yes’ out put but deletion doesn’t happen. i.e. return true OR in other words asking JS to proceed with deletion doesn’t happen.
Please advice. Thanks!