Results 1 to 7 of 7

Thread: Custom query in Team Popup

  1. #1
    dskanth is offline Senior Member
    Join Date
    Mar 2009
    Posts
    97

    Default Custom query in Team Popup

    Hai, i need a custom query to show the data in the popup that appears when we click on the Team Select button.
    I want to restrict the logged in user to select only 1 team (same team), when he is creating the Lead.

    By default, all the teams are shown in the popup. But i want to show the Team of the current user in the popup.
    Where can i find the query to get the Teams and modify it to show only the team of the current user ?
    Please suggest any solutions.
    Last edited by dskanth; 2009-07-10 at 01:09 PM.

  2. #2
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: Custom query in Team Popup

    I'm not sure if this is the case here but sometimes you can simply change their roles permissions so that List is set to Team only so that the popup only shows the 1 team that they are a member of.

  3. #3
    dskanth is offline Senior Member
    Join Date
    Mar 2009
    Posts
    97

    Default Re: Custom query in Team Popup

    Ok, so we need to set the roles preferences to List as Owner? I want the popup list to show only 1 team (Team of logged in user).
    Can we edit the roles of parent team admin and the child team members, such that their "List" is set to Owner ? Is this what you are saying?

  4. #4
    dskanth is offline Senior Member
    Join Date
    Mar 2009
    Posts
    97

    Default Re: Custom query in Team Popup

    I have edited the role of team admin user, and made the permission "List" to Owner, repaired the Leads module. But when i logged as team admin user and tried to create a Lead, i still see all the teams in the popup that appears. What do i need to do, to show only the team of Admin in the popup ?
    Please advice...

  5. #5
    dskanth is offline Senior Member
    Join Date
    Mar 2009
    Posts
    97

    Exclamation Re: Custom query in Team Popup

    Can we do something in the file ... cache/modules/Leads/EditView.tpl ?
    It calls the open_popup() function when we click on the Select button. The function is present in the file: ....include/javascript/sugar_grp1.js
    Can we change the "initial_filter" parameter of this function to something like a query ?
    I have no idea. Can someone throw a light here ?

  6. #6
    dskanth is offline Senior Member
    Join Date
    Mar 2009
    Posts
    97

    Default Re: Custom query in Team Popup

    Finally i could get some solution. I modified the _get_where_clause method of the file CETeamsPopupSmarty.php in the CETeams folder of the modules folder. Check http://www.sugarcrm.com/forums/showt...ght=popup+data
    Last edited by dskanth; 2009-07-14 at 11:31 AM.

  7. #7
    ivolator's Avatar
    ivolator is offline Sugar Community Member
    Join Date
    Sep 2006
    Location
    Dagobah
    Posts
    98

    Default Re: Custom query in Team Popup

    In the latest releases you can set the CETeams behavior to not allow users to see other teams except their own.
    May the source be with you!

    A message from the Dark Side there is ...
    Be done in sugarcrm, no core changes should. Hmmmmmm.
    ...


    Teams For The Masses
    Video Demo of CETeams module

    SimpleCaptcha - A Captcha for SugarCRM 5.2.0x


    Password Resetting For SugarCRM CE PRO and ENT 5.2.0x

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Custom query for list view in custom module
    By precar in forum Developer Help
    Replies: 3
    Last Post: 2009-06-15, 04:01 AM
  2. popup query works no more
    By Mr.X in forum Developer Help
    Replies: 0
    Last Post: 2009-03-19, 08:13 AM
  3. Team query
    By sidh2111 in forum Developer Help
    Replies: 0
    Last Post: 2009-01-16, 06:01 AM
  4. Replies: 0
    Last Post: 2008-01-16, 08:48 AM
  5. Custom query in Custom Dashboard module
    By tbivans in forum Developer Help
    Replies: 11
    Last Post: 2007-03-05, 07:18 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
  •