Hello,
I am writing client script to cancel a document (A-2024-001) of “Doctype B” from a custom button on form view of “Doctype A”.
Below is the part of my script.
frappe.db.get_doc('Doctype B', 'A-2024-001')
.then(doc => {
// console.log(doc)
frappe.call({
method: "frappe.client.cancel",
args: {
"doctype": doc.doctype,
"docname": doc.name,
"doc": doc
},
});
})
but its giving error as below.
TypeError: cancel() missing 1 required positional argument: 'name'
Any hint and suggestions will be highly appreciated.
Thanks.