How can find the code that fire when bulk sales invoice for next status in its workflow


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.

i could not find it in side sales invoice py file?
@ejaaz

You can define these functions in your custom file by overriding them.
https://frappeframework.com/docs/user/en/basics/doctypes/controllers


the exception does not display in pop like i want its recored in error log
how could i display it?

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