Results 1 to 6 of 6

Thread: How to avoid the "Clear" button function

  1. #1
    trivoc is offline Sugar Community Member
    Join Date
    Mar 2007
    Posts
    34

    Default How to avoid the "Clear" button function

    Hi, when i make an account search i get an accounts list. If i go back to the accounts i get the same list... i have to clic on the "clear" button to get the whole accounts list. All is OK, i know this is the normal way Sugar works.

    In my case, i'd like to get the whole accounts (or contacts) list when i go (back) to the Accounts (or Contacts) even if i have made a previous search without clicking on the "clear" button. Is this possible?
    Another way to explain what i need: i want to get the whole list of accounts everytime i clic on the Accounts tab (and the same for the Contacts), even if i haven't clic on the "clear" button afetr a search.

    Thanks in advance.

    vic

  2. #2
    Angel's Avatar
    Angel is offline Sugar Community Member
    Join Date
    Jul 2005
    Location
    Los Angeles
    Posts
    4,813

    Default Re: How to avoid the "Clear" button function

    It is possible, but you'd have to manually edit the PHP source files to cause Sugar to generate the properly formatted URL used for the Accounts tab hyperlink.

    It would have to look something like this:

    Code:
    index.php?searchFormTab=basic_search&module=Accounts&action=index&query=true&clear_query=true
    Regards,

    Angel Magaña
    Co-Author: Implementing SugarCRM 5.x (Packt Publishing -- Sept. 2010)
    Blog: http://cheleguanaco.blogspot.com.
    Twitter: @cheleguanaco.

    ________
    | Projects: |_____________________________________
    |
    | CandyWrapper (.NET Wrapper for SugarCRM SOAP API). Source now available on GitHub!
    | GoldMine to SugarCRM Express Conversion. Latest: 1.0.1.7 (Nov. 3, 2009)
    | CRM SkyDialer (Skype Integration). Latest: 1.0.2 (Feb. 17, 2010)
    | Round Robin Leads Assignment
    | Phone Number Formatter
    | CaseTwit (Twitter Integration)
    ______________________________________________

  3. #3
    kuske's Avatar
    kuske is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    Germany
    Posts
    2,597

    Default Re: How to avoid the "Clear" button function

    Perhaps it is enough to add some lines to index.php in / directory:

    after:

    PHP Code:
    ///////////////////////////////////////////////////////////////////////////////
    ////    RENDER PAGE REQUEST BASED ON $module - $action - (and/or) $record 
    add:

    PHP Code:
    if($action == 'index')
    {
       
    $_REQUEST['clear_query'] = 'true';
       
    $_REQUEST['query'] = 'true';


    hk

  4. #4
    trivoc is offline Sugar Community Member
    Join Date
    Mar 2007
    Posts
    34

    Default Re: How to avoid the "Clear" button function

    Hi Angel and Kuske, thank you very much for your help.

    I've tried by adding to index.php this code:

    if($action == 'index')
    {
    $_REQUEST['clear_query'] = 'true';
    $_REQUEST['query'] = 'true';
    }

    And it has worked OK.

    Thanks again

    vic
    Last edited by trivoc; 2007-11-05 at 07:34 AM.

  5. #5
    sidh211 is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    126

    Default Re: How to avoid the "Clear" button function

    Hi all

    I am using SugarCRM 5.0 CE and facing this same issue. Tried making the changes in index.php but no luck . Is there any workarround for this??

    Thanks,
    Siddhesh

  6. #6
    andopes's Avatar
    andopes is offline A Sugar Hero | Help Forum Moderator
    Join Date
    Jul 2006
    Location
    São Paulo - Brazil
    Posts
    8,335

    Default Re: How to avoid the "Clear" button function

    I would suggest you to create a logic hook after retrieve on Users module:

    PHP Code:
    <?php
    if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

    class 
    UserLogicHook {
        function 
    resetSearch(&$focus$event$arguments) {
            global 
    $current_user;
            
            if(
    $focus->id == $current_user->id && isset($_REQUEST['action']) && $_REQUEST['action'] == 'index') {
                
    $_REQUEST['clear_query'] = 'true';
                
    $_REQUEST['query'] = 'true';
            }
        }
    }
    ?>
    This is an upgrade safe customization.

    Regards
    André Lopes
    DevToolKit / Project of the Month - June 2009
    Lampada Global Services- Open Source Solutions
    Avenida Ipiranga, 318
    Bloco B - CJ 1602
    São Paulo, SP 01046-010
    Brazil
    Office: +55 11 3237-3110
    Mobile: +55 11 7636-5859
    e-mail: andre@lampadaglobal.com

    Lampada Global delivers offshore software development and support services to customers around the world.
    Lampada is proud to be a SugarCRM Gold Partner, revolutionizing Customer Relationship Management.

    I DO NOT answer questions through PM and Email. If you need some help post your question into SugarForum.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 7
    Last Post: 2007-08-24, 10:51 PM
  2. Replies: 0
    Last Post: 2007-08-08, 02:47 PM
  3. SQL Error : 'ROW_NUMBER' is not a recognized function name.
    By mhoppes in forum Installation and Upgrade Help
    Replies: 16
    Last Post: 2007-08-06, 03:58 PM
  4. Replies: 4
    Last Post: 2007-01-03, 11:11 AM
  5. export function in Accounts save button
    By daska in forum Developer Help
    Replies: 2
    Last Post: 2006-07-14, 07:47 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •