Hello,
I saw here on the forum how to use SugarApplication:redirect() in php code for redirection, but when trying to use it I was unsuccessful. I tried in a few ways:
SugarApplication::redirect("#Leads");
SugarApplication::redirect('index.php?module=Leads');
SugarApplication::redirect("URL");
I added this in my code below save():
if ($bean->moment_c == "Nao Cliente" && $bean->parent_type == "Leads")
{
$beanLead->no_client_c = 1;
$beanLead->moment_c = $bean->moment_c;
$beanLead->reason_no_client_c = $bean->reason_no_client_c;
$beanLead->save();
SugarApplication::redirect("#Leads");
}
Could you please help me? Do I need to add anything else in the code besides the SugarApplication:redirect()? How can I redirect to list view through php?