[Vtigercrm-developers] [2.] How to redirect a view in vtiger 6.1 ?
Prasad
prasad at vtiger.com
Tue Jul 15 05:47:47 GMT 2014
Reference:
http://community.vtiger.com/help/vtigercrm/developers/extensions/internals.html#ui-request-processing
The View request flow would go through
preProcess
process
postProcess
Redirection in process would fail as preProcess emits some content - you
many have to override this.
Action is best candidate since preProcess and postProcess is not triggered.
Regards,
Prasad
*Connect with us on: *Twitter <http://twitter.com/vtigercrm> *I* Facebook
<http://www.facebook.com/pages/vtiger/226866697333578?sk=wall> *I* Blog
<https://blogs.vtiger.com/>* I* Wiki
<http://wiki.vtiger.com/index.php/Main_Page> *I *Forums
<https://discussions.vtiger.com>*I* Website <https://www.vtiger.com/>
On Tue, Jul 15, 2014 at 12:37 AM, Holbok István <holbok at gmail.com> wrote:
> Dear Vtiger Community,
>
> I would like to redirect a view in vtiger 6.1. What is the best suggested
> way to do it?
>
> Case:
> There is an event handler registered to the Contacts (standard) module in
> my Custom module.
> 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.
>
> if($eventName == 'vtiger.entity.aftersave') {
> // Entity has been saved, take next action
> *$log->debug('Contacts: vtiger.entity.aftersave --- fired in
> Custommodule directory');*
>
> // Check some conditions
>
> // If the conditions true, redirect the view
> $redirectUrl = 'index.php?module=*Custommodule*&view=
> *Customview*';
> header("Location: $redirectUrl");
> * exit();*
>
> }
>
> Adding the command *exit();* after the line of header the redirection
> started work.
>
> But the question is still exist: *Is this way the best method to change
> vtiger view depending a condition?*
>
>
> 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?
>
>
> Any suggestion is appreciated.
>
> Kindest regards:
> Istvan
>
>
> --
> üdvözlettel:
>
> *Holbok István*
>
> +3670-342-0900
> *e-mail:* holbok at gmail.com
> *SkyPe:* holboki
>
>
> _______________________________________________
> http://www.vtiger.com/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.vtigercrm.com/pipermail/vtigercrm-developers/attachments/20140715/91286042/attachment.html>
More information about the vtigercrm-developers
mailing list