Results 1 to 3 of 3

Thread: Filter tasks,contacts,accouts, list

  1. #1
    piccirm2 is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    65

    Default Filter tasks,contacts,accouts, list

    Hi

    I'm trying to filter tasks,contact and accounts only to the assigned_user
    For example for tasks if I change query in task.php in the function create_list_query it seems to affect only tasks diplayed in caledar view and not the tasks in the list view
    Where is the query that affect the list view ????
    Sugar CE 5.0.0c
    tks
    ________
    Vaporizers
    Last edited by piccirm2; 2011-01-18 at 10:18 PM.

  2. #2
    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: Filter tasks,contacts,accouts, list

    Hi, piccirm2

    Do you want to enable users to see only their own entries?
    If so then you could create a logic hook after retrieve in the Users module.

    The logic hook function could looks like that:

    PHP Code:
        function filterEntries(&$focus$event$arguments) {
            global 
    $current_user;

            if(
    $focus->id == $current_user->id) {
                if((isset(
    $_REQUEST['action']) && ($_REQUEST['action'] == 'index' || $_REQUEST['action'] == 'ListView'))) {
                    if(! isset(
    $_REQUEST['searchFormTab']) || $_REQUEST['searchFormTab'] == 'basic_search') {
                        
    $_REQUEST['searchFormTab']        = 'basic_search';
                        
    $_REQUEST['query']                = 'true';
                        
    $_REQUEST['current_user_only_basic'] = 1;
                    } else if(
    $_REQUEST['searchFormTab'] == 'advanced_search') {
                        
    $_REQUEST['query']                   = 'true';
                        
    $_REQUEST['searchFormTab']           = 'advanced_search';
                        
    $_REQUEST['assigned_user_id_advanced[]'] = $current_user->id;
                    }
                }
            }
        } 
    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.

  3. #3
    piccirm2 is offline Sugar Community Member
    Join Date
    Apr 2008
    Posts
    65

    Default Re: Filter tasks,contacts,accouts, list

    thanks but I not so confident with hooks
    I'm even not so an advanced developer
    I'd prefer a more straight solution inside module dir even if it's not upgrade safe
    ________
    volcano vaporizer reviews
    Last edited by piccirm2; 2011-01-18 at 10:18 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. HOW-TO guide for Email Campaigns.
    By agupta in forum Marketing/Campaign Management
    Replies: 146
    Last Post: 2012-01-31, 03:08 PM
  2. Email management - Improvements in future releases
    By manoj in forum Feature Requests
    Replies: 102
    Last Post: 2009-11-17, 06:43 AM
  3. Replies: 4
    Last Post: 2009-10-28, 10:21 AM
  4. Default Filter List
    By Overdriv in forum Developer Help
    Replies: 5
    Last Post: 2006-05-08, 08:08 PM

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
  •