Skip to content

Instantly share code, notes, and snippets.

@austgate
Last active November 28, 2016 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save austgate/4699101 to your computer and use it in GitHub Desktop.
Save austgate/4699101 to your computer and use it in GitHub Desktop.
Using SugarCRM's Sugar Application to show error messages and redirects.
SugarApplication::appendErrorMessage('Enter your message string');
$params = array(
'module'=> 'Accounts',
'action'=>'DetailView',
'id' => $bean->id
);
SugarApplication::redirect('index.php' . http_build_query($params));
@safwanebrahim-uc
Copy link

There is an update in 7th line
SugarApplication::redirect('index.php?' . http_build_query($params));

just added '?'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment