What is the correct place to add an "on_submit" for Sales Invoice?

I can see the handler I want to intercept at erpnext / erpnext / hooks.py ==> Line 202

I specifically need the server-side event in order to initiate a call to a remote host.

Qs:

What is the correct place to add an “on_submit” for Sales Invoice?

Is modifying core code the only way to do that?

Should I create a new doctype and use it’s hooks.py?

Custom scripts are client-side only, correct?

Make HTTP request to remote host on server side doc_event?

Did you try webhooks? Webhooks

4 Likes

THAT is exactly what I was looking for!

Thank you! Thank you! Thank you!