<div dir="ltr"><div>Chris,</div><div><br></div><div>You can find the information about the invoice which is being created in InvoiceHandler.php(handleEvent Api).</div><div>Products related to to the invoice are stored in separate table(vtiger_inventoryproductrel)</div>
<div><br></div><div>example query to fetch the products related to invoice will be</div><div><br></div><div><span style="font-size:13px;font-family:arial,sans-serif">SELECT productid FROM vtiger_inventoryproductrel INNER JOIN vtiger_crmentity ON vtiger_crmentity.crmid = vtiger_inventoryproductrel.</span><span style="font-size:13px;font-family:arial,sans-serif">productid AND vtiger_crmentity.deleted=0 WHERE id = '?';</span>  </div>
<div><br></div><div>id will be the invoiceid on which the event is getting triggered.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jul 22, 2014 at 7:04 AM, Hamono, Chris (DPC) <span dir="ltr"><<a href="mailto:Chris.Hamono@sa.gov.au" target="_blank">Chris.Hamono@sa.gov.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">






<div>
<font face="Calibri, sans-serif">
<div>I need to do some post processing when a new invoice is created.</div>
<div> </div>
<div>It appears that when a new invoice is created and the onaftersave event is fired there is neither a productid nor an invoiceid in the invoice object sent to the event.</div>
<div> </div>
<div>1/ When are they created? </div>
<div>2/ How do I find this information?</div>
<div> </div>
<div>The invoice is being created programmatically if that makes a difference</div><span class="HOEnZb"><font color="#888888">
<div> </div>
<div>Chris</div>
<div> </div>
</font></span></font>
</div>

<br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br></div>