Skip to content

Instantly share code, notes, and snippets.

@betobaz
Last active September 26, 2023 10:14
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save betobaz/f0fa1dbd329b76904178 to your computer and use it in GitHub Desktop.
Save betobaz/f0fa1dbd329b76904178 to your computer and use it in GitHub Desktop.
SugarCRM:: Filter default:: Add another fields to quick_search

#Extending quick search to default filter to search by custom field#

This customization allows to user to search by another field aside name field

<?php
$viewdefs['Accounts']['base']['filter']['default'] = array (
'quicksearch_field' => array('name', 'my_custom_field_c'),
'quicksearch_priority' => 2,
'default_filter' => 'all_records',
'fields' =>
array (
'name' => array (),
),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment