Hi All,
How can we redirect to the record view of another record(sidecar) using the after save logichook(php)
Regards André Lopes Francesca Shiekh hats
Sidhu
Hi All,
How can we redirect to the record view of another record(sidecar) using the after save logichook(php)
Regards André Lopes Francesca Shiekh hats
Sidhu
Hi All,
I have tried this in my after save logichook.
$script = navigateToSidecar(
buildSidecarRoute("Calls","0ef6a492-72ae-11e7-819d-fa163e8c8e90", translateToSidecarAction("edit"))
);
_ppl("<script>$script</script>");
echo "<script>$script</script>"
But i am getting an error.
What can be the solution for this
Tevfik Tümer
i am getting this when i log in the above code but i am unable to redirect in after save logichook.
<script>parent.SUGAR.App.router.navigate('Calls/0ef6a492-72ae-11e7-819d-fa163e8c8e90/edit', {trigger: true});</script>
Regards
Sidhu
Hi sidhu sidhu
I would suggest you to manage the redirect at view controller instead.
You can extends the clients/base/views/record/record.js and override the method _saveModel. This way you can listen to this.model.save({}, options); and redirect it accordingly.
Kind regards
Hi sidhu sidhu
I would suggest you to manage the redirect at view controller instead.
You can extends the clients/base/views/record/record.js and override the method _saveModel. This way you can listen to this.model.save({}, options); and redirect it accordingly.
Kind regards
I do agree with the answer from André Lopes.
Logic hooks on the standard MVC are considered a model component, therefore interacting with the backend logic of the system, so should be independent from what happens to the UI.
Cheers
--
Enrico Simonetti
Sugar veteran (from 2007)
Feel free to reach out for consulting regarding:
All active SugarCRM certifications
Actively working remotely with customers based in APAC and in the United States