I have a custom Doctype where there is a status field. If that status is “Rejected” it should show a confirmation message saying “are you sure you want reject this policy?”. If Yes is clicked than only this document should submit. How to achieve this?
Sorry, I forgot that frappe.confirm is a client-side method. Because these are async methods, you need to treat the prompt as a promise that you await: