Results 1 to 3 of 3

Thread: Viewing reports for OWNER ONLY

  1. #1
    gkeyes is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    29

    Default Viewing reports for OWNER ONLY

    My system is setup for accessing and viewing for OWNER ONLY. In the reports I am creating I am seeing ALL the records. Is there a way I can incorporate that same type of "Owner" only access in reporting. Below is my is sample of my report code, so far.

    SELECT leads.first_name, leads.last_name, leads.phone_work, leads.phone_mobile, leads.date_entered, leads.date_modified, leads.description, leads.account_name
    FROM leads
    WHERE leads.deleted = 0
    ORDER BY leads.date_entered;

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

    Default Re: Viewing reports for OWNER ONLY

    You'll need the ID value that corresponds with your user name, then modify this:

    Quote Originally Posted by gkeyes
    SELECT leads.first_name, leads.last_name, leads.phone_work, leads.phone_mobile, leads.date_entered, leads.date_modified, leads.description, leads.account_name
    FROM leads
    WHERE leads.deleted = 0
    ORDER BY leads.date_entered;
    to:

    SELECT leads.first_name, leads.last_name, leads.phone_work, leads.phone_mobile, leads.date_entered, leads.date_modified, leads.description, leads.account_name
    FROM leads
    WHERE leads.deleted = 0
    AND assigned_user_id = 'THE_ID_VALUE_FOR_YOUR_USER'
    ORDER BY leads.date_entered;
    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
    gkeyes is offline Sugar Community Member
    Join Date
    May 2008
    Posts
    29

    Default Re: Viewing reports for OWNER ONLY

    Thank You, I will give this a try.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Outputting to reports
    By matthewseymour in forum Help
    Replies: 1
    Last Post: 2006-08-20, 08:26 PM
  2. help - Reports have gone missing
    By crmireland in forum Help
    Replies: 0
    Last Post: 2006-07-18, 10:40 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
  •