Results 1 to 3 of 3

Thread: Modifing Sql query for Contact popup

  1. #1
    prajeesh is offline Senior Member
    Join Date
    Jun 2009
    Posts
    64

    Default Modifing Sql query for Contact popup

    Hi

    I added a custom relate field 'primary contact' in the EditView of opportunities. This relate field will popup all the contacts in the system. But I would like to get only the contacts which are associated with the selected 'Account Name' in the same screen. I want to change the sql query so that contacts are shown based on this condition. Please guide me.

    Thanks,
    Prajeesh

  2. #2
    mvngti is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    South Africa
    Posts
    510

    Default Re: Modifing Sql query for Contact popup

    In short, what you are trying to do can not be done standard in SugarCRM. There is not simple way to alter the query run by the popup windows and there is no logic hook that fires under those conditions.

    You best bet is to add some code to the bottom of the popupdefs.php for that module and then make the file immutable so sugar can not overwrite it.

    M
    --


    Marnus van Niekerk

    There are only 10 types of people in the world
    those who can read binary and those who don't

    Modules:
    CE Teams - Upgrade safe teams module for Community Edition
    FieldACL - Field Level Access Control for Community Edition
    EditLogicHooks - Create and edit Logic Hooks from the Admin GUI
    FlexibleChartDashlet - Display any data in a Dashlet Chart
    DocumentThumbnails - Thumbnails for Documents module

    Many questions can be answered by reading the Developers Manual

  3. #3
    mvngti is offline Sugar Community Member
    Join Date
    Oct 2007
    Location
    South Africa
    Posts
    510

    Default Re: Modifing Sql query for Contact popup

    If you look at the teams_logic.php file of my CETeams module, there is a method limit_list_access that does something similar based on teams.

    You can limit the list by setting some values into $_REQUEST that will then get included in the query.

    M
    --


    Marnus van Niekerk

    There are only 10 types of people in the world
    those who can read binary and those who don't

    Modules:
    CE Teams - Upgrade safe teams module for Community Edition
    FieldACL - Field Level Access Control for Community Edition
    EditLogicHooks - Create and edit Logic Hooks from the Admin GUI
    FlexibleChartDashlet - Display any data in a Dashlet Chart
    DocumentThumbnails - Thumbnails for Documents module

    Many questions can be answered by reading the Developers Manual

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. User popup query customization problem
    By anamikakhadwal in forum Developer Help
    Replies: 8
    Last Post: 2009-08-12, 05:53 AM
  2. Custom query in Team Popup
    By dskanth in forum Help
    Replies: 6
    Last Post: 2009-07-21, 10:36 PM
  3. popup query works no more
    By Mr.X in forum Developer Help
    Replies: 0
    Last Post: 2009-03-19, 08:13 AM
  4. Replies: 0
    Last Post: 2008-08-06, 09:14 AM
  5. Modifing custom field value
    By otelem in forum Developer Help
    Replies: 2
    Last Post: 2007-12-14, 03:53 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
  •