If you know after submitting any document you can ‘Cancel’ it first then ‘Amend’, change/update document and save it status become “Draft”.
I gave ‘cancel’ permission to the doctype and could cancel the record. However I don’t see any button to ‘amend’ the same. I tried duplicating the record, but that fails due to name conflict with original record. Is there anything more to do to get the ‘amend’ button?
@spoojary . Open the doctype and check the amend box in the permission rules child table for that particular user
Great. Thanks @shraddha,
I could get the amend button visible after cancelling. However still couldn’t get the flow working. Basically I am trying to add two doctypes:
Course Content: With a list of chapters for a subject
Chapter Content: A chapter with some notes and references, with a link to course content
I can cancel a ‘course content’, but amending it results in following failure
11:28:59 web.1 | File “/home/spoojary/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/cursors.py”, line 205, in execute
11:28:59 web.1 | self.errorhandler(self, exc, value)
11:28:59 web.1 | File “/home/spoojary/frappe-bench/env/local/lib/python2.7/site-packages/MySQLdb/connections.py”, line 36, in defaulterrorhandler
11:28:59 web.1 | raise errorclass, errorvalue
11:28:59 web.1 | DuplicateEntryError: (u’Chapter’, u’Insects’, IntegrityError(1062, “Duplicate entry ‘Insects’ for key ‘PRIMARY’”))
11:28:59 web.1 |
whereas ‘cancel’ on Chapter Content fails due to its linked doctype
11:37:49 web.1 | File “/home/spoojary/frappe-bench/apps/frappe/frappe/init.py”, line 279, in _raise_exception
11:37:49 web.1 | raise raise_exception, encode(msg)
11:37:49 web.1 | LinkExistsError: Cannot delete or cancel because Chapter Content Notes is linked with Course Content UKG-MUSIC
Could you please let me know what exactly happens as part of ‘cancel’ and ‘amend’?