I have tried the following events for invoice creation observer:
and in the observer I am calling:
$invoice = $observer->getEvent()->getInvoice(); $invoice_id = $item->getData('entity_id');
For all of the above events, the entity_id is received as null. Also the observer is called before there is a new entry in the database.
What is the correct event to get invoice id after it is saved?