Hello, i have a custom doctype that works with a workflow, and i want to ask users to select a reason (from a dropdown list) when they click the cancel button,
How can i achieve this ?
Thanks!!
Hello, i have a custom doctype that works with a workflow, and i want to ask users to select a reason (from a dropdown list) when they click the cancel button,
How can i achieve this ?
Thanks!!
same feature is available in Quotation.
We can set quotation to Lost and enter Lost Reason as shown in photo.
Code:
erpnext/quotation.js at develop · frappe/erpnext · GitHub
You can write same script on after_cancel
event. So after cancel system will ask user to select a reason for cancellation.
Regards,
Sambhaji Kolate,
New Indictrans Technologies Pvt Ltd.
I would suggest to hook into the on_cancel event of the DocType in my app and push up a dialog, where i can enter the reason and store it somewhere, maybe a CustomField or a special Reason DocType. This would be the most simple solution.
Or you can enter a Comment using the board tools of ERPNext in the DocType history. But this is not an enforced process but more a working procedure.
Thanks will do this an share the results!
Thanks!! i will let you know how it worked