Hi Everybody !<br><br>According to this ticket : <a href="http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/5468">http://trac.vtiger.com/cgi-bin/trac.cgi/ticket/5468</a><br><br><p>
&quot;When you add an aftersave event to an entity and in the <a class="missing wiki" href="http://trac.vtiger.com/cgi-bin/trac.cgi/wiki/HandleEvent" rel="nofollow">HandleEvent?</a> you create (and save) another entity, it raises an infinite loop.
</p>
<p>
This occurs because VTEvenTrigger::trigger
(include/events/VTEventTrigger.inc), execute all handlers registered
when saving an entity. It should execute ONLY handler for current
entity&quot;
</p>According to the same ticket the solution is :<br><br>&quot;This is something the developer will have to handle in their own code. There are events that will have to run on every save.&quot;<br><br>But how do we actually handle this in the code ?<br>
<br>Does anyone have a working example of how to avoid infinite loop without modifying Vtiger core ?<br><br>Thank you very much.<br><br clear="all">David V.<br>