in my example “draft” It worked with all statuses except submit I think because I added a custom code for fire sms when inserting a new record in the gl entry
Try the before_save
or on_update
method; it’s triggered when workflow states change.
You can define these functions in your custom file by overriding them.
https://frappeframework.com/docs/user/en/basics/doctypes/controllers
You can log errors manually if you want to create a record in an Error Log Doctype.
frappe.log_error(
"Title of Error",
"Description of Error",
'GL Entry',
record_name
)
this help in single doc fire but in bulk just add the correct path that is /api/method/frappe.model.workflow.bulk_workflow_approval