<div dir="ltr">Hey guys,<br><br><br>I’ve got a problem and I was wondering if anyone has encountered a similar problem or anyone has a guess what’s causing my problem.<br> <br><br>I have a workflow created through the module: Workflow Designer that converts a Sales order to an Invoice, I also have a custom module with an Event handler that launches on a after save event of the Invoice module.<br><br>When launching the workflow that converts the Sales order to an Invoice I get a blank page.<br><br>If I check invoices, is do see that the invoice is created, but it has no items (products) assigned to it. <br><br>I understand an Invoice is created in 2 steps:<br><br>            -Step1 all fields get saved.<br><br>            -Step2 All attached items get saved.<br><br><br>So it looks like my ‘vtiger.entity.aftersave’ event is being called on Step1 and for some reason stops the Invoice from being created.<br><br>So after realizing it’s probably because my Handler gets called in Step1 of the Invoice save, I build in a check in my Module Handler to see if the created invoice contains items (products) if not my script does nothing else.<br><br><br>But I still get the blank page even after creating this check in my EventHandler.<br><br><br>Do I maybe need to tell my EventHandler to continue; or something like that after it sees it has no items assigned to the invoice?<br><br><br>Hopefully someone can give me a push in the right direction.<br><br>Thanks in Advance!<br> <br><br>Kind Regards,<br> <br><br>Lennart</div>