<div dir="ltr"><div>Reference:</div><a href="http://community.vtiger.com/help/vtigercrm/developers/extensions/internals.html#ui-request-processing">http://community.vtiger.com/help/vtigercrm/developers/extensions/internals.html#ui-request-processing</a><div>
<br></div><div>The View request flow would go through<div><br></div><div>preProcess</div><div>process</div><div>postProcess</div><div><br></div><div>Redirection in process would fail as preProcess emits some content - you many have to override this.</div>
<div>Action is best candidate since preProcess and postProcess is not triggered.</div><div><br></div><div>Regards,</div><div>Prasad</div><div><br></div></div></div><div class="gmail_extra"><br clear="all"><div><span style="border-collapse:collapse;font-family:arial,sans-serif;font-size:13px"><b>Connect with us on: </b><a href="http://twitter.com/vtigercrm" style="color:rgb(0,0,204)" target="_blank">Twitter</a> <b>I</b> <a href="http://www.facebook.com/pages/vtiger/226866697333578?sk=wall" style="color:rgb(0,0,204)" target="_blank">Facebook</a> <b>I</b> <a href="https://blogs.vtiger.com/" style="color:rgb(0,0,204)" target="_blank">Blog</a><b> I</b> <a href="http://wiki.vtiger.com/index.php/Main_Page" style="color:rgb(0,0,204)" target="_blank">Wiki</a> <b>I </b><a href="https://discussions.vtiger.com" style="color:rgb(0,0,204)" target="_blank">Forums </a><b>I</b> <a href="https://www.vtiger.com/" style="color:rgb(0,0,204)" target="_blank">Website</a></span></div>
<br><br><div class="gmail_quote">On Tue, Jul 15, 2014 at 12:37 AM, Holbok István <span dir="ltr"><<a href="mailto:holbok@gmail.com" target="_blank">holbok@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><div class="">
Dear Vtiger Community,<br>
<br>
I would like to redirect a view in vtiger 6.1. What is the best
suggested way to do it?<br>
<br>
Case:<br>
There is an event handler registered to the Contacts (standard)
module in my Custom module.<br>
The Save action in the Contacts module triggered the event handler
and I could see, the program executed. The red line log the info to
the logfile.<br>
<br>
if($eventName == 'vtiger.entity.aftersave') {<br>
// Entity has been saved, take next action<br>
<b><font color="#cc0000">$log->debug('Contacts:
vtiger.entity.aftersave --- fired in Custommodule directory');</font></b><br>
<br>
// Check some conditions<br>
<br>
// If the conditions true, redirect the view<br>
$redirectUrl = 'index.php?module=<b><font color="#cc0000">Custommodule</font></b>&view=<b><font color="#cc0000">Customview</font></b>';<br>
header("Location: $redirectUrl");<br></div>
<b><font color="#000099"> exit();</font></b><br>
<br>
}<br>
<br>
Adding the command <b><font color="#000099">exit();</font></b>
after the line of header the redirection started work.<br>
<br>
But the question is still exist: <b>Is this way the best method to
change vtiger view depending a condition?</b><br>
<br>
<br>
Other question is: How to do different modal popup windows related
to the 'vtiger.entity.aftersave' event of the Contacts module
without rewriting the original code?<div class=""><br>
<br>
Any suggestion is appreciated.<br>
<br>
Kindest regards:<br>
Istvan<br>
<br>
<br>
<div>-- <br>
üdvözlettel:<br>
<br>
<b>Holbok István</b><br>
<br>
+3670-342-0900<br>
<b>e-mail:</b> <a href="mailto:holbok@gmail.com" target="_blank">holbok@gmail.com</a><br>
<b>SkyPe:</b> holboki<br>
<br>
</div>
</div></div>
<br>_______________________________________________<br>
<a href="http://www.vtiger.com/" target="_blank">http://www.vtiger.com/</a><br></blockquote></div><br></div>