Skip to content

Instantly share code, notes, and snippets.

@chadhutchins
Last active December 10, 2015 12:58
Show Gist options
  • Save chadhutchins/4437721 to your computer and use it in GitHub Desktop.
Save chadhutchins/4437721 to your computer and use it in GitHub Desktop.
<?php
include('modules/MySettings/StoreQuery.php');
class defaultSearch
{
function filterList(&$bean, $event, $arguments)
{
global $current_user, $sugar_config;
// create instance of StoreQuery
$squery= new StoreQuery();
//specify query and save
$squery->query=array('account_name_basic'=>'ACME Inc', 'module'=>'Contacts','searchFormTab'=>'basic_search','query'=>'true','action'=>'index');
$squery->SaveQuery('Contacts');
}
}
<?php
$hook_array['after_login'][] = Array(0, 'Default_Search', 'custom/modules/Users/defaultSearch.php','defaultSearch', 'filterList');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment