Results 1 to 5 of 5

Thread: Custom querys???

  1. #1
    ezcurrax is offline Sugar Community Member
    Join Date
    Apr 2008
    Location
    Spain
    Posts
    194

    Red face Custom querys???

    What file or function i have to modify to make a custom search using my own fields???
    i need to do in the module contacts .. in the pop-up that appeairs in campaigns...
    thanks...
    Sugar Version : 5.0.0e
    Sugar Edition : SugarCE
    Category : Campaigns,contacts,pop-ups,etc
    Operating System : (Ubuntu Server 7.10 gutsy gibbon)
    PHP Version : PHP 5.2.3-1ubuntu6.3 (cli) (built: Jan 10 2008 09:38:37)
    Database : MySQL Client Version 5.0.45
    Web Server : Apache 2.2.4
    Browser : Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14
    Hardware:
    1 Gb de ram
    Procesador Intel pentium 4 CPU 1,70 Ghz
    Testing Computer
    EUVE European Virtual engineering
    http://www.euve.net/es/index.asp
    Vitoria-Gasteiz
    Basque Country
    Spain

  2. #2
    kenshiro is offline Sugar Community Member
    Join Date
    Mar 2007
    Location
    Macerata - ITALY
    Posts
    421

    Default Re: Custom querys???

    Maybe Enhanced Search fulfill your needs.

    Take a look at this thread for more details.

  3. #3
    ToniFatec is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    64

    Smile Re: Custom querys???

    Hi,
    In a code-level perspective you can re-use SugarCRM Framework own method to get access the database and then use your own query to check/updat/do whatever you want.
    The following is a hypothetical example to be put inside the class of a module.

    PHP Code:
        $personalQuery "SELECT accounts.id, accounts.name FROM accounts
    WHERE accounts.id ='$this->specialId'"
    ;
            
    $personalResult $this->db->query($personalQuery,true," Error filling in additional detail fields: ");
            
    $personalRow $this->db->fetchByAssoc($personalResult);

            if(
    $personalRow != null) {
                
    $otherField $personalRow['id'];
            } 

  4. #4
    ezcurrax is offline Sugar Community Member
    Join Date
    Apr 2008
    Location
    Spain
    Posts
    194

    Thumbs up Re: Custom querys???

    if i wanna to make query on a pop - up for contacts.... wich class i have to modify ??

    pop - updefs.php??

    i think this won `t work

    have u got any idea ?

    the pop - up is when click on campaigns , select target list , and then click on select contacs ,


    a lot of thanks......
    Sugar Version : 5.0.0e
    Sugar Edition : SugarCE
    Category : Campaigns,contacts,pop-ups,etc
    Operating System : (Ubuntu Server 7.10 gutsy gibbon)
    PHP Version : PHP 5.2.3-1ubuntu6.3 (cli) (built: Jan 10 2008 09:38:37)
    Database : MySQL Client Version 5.0.45
    Web Server : Apache 2.2.4
    Browser : Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14
    Hardware:
    1 Gb de ram
    Procesador Intel pentium 4 CPU 1,70 Ghz
    Testing Computer
    EUVE European Virtual engineering
    http://www.euve.net/es/index.asp
    Vitoria-Gasteiz
    Basque Country
    Spain

  5. #5
    ezcurrax is offline Sugar Community Member
    Join Date
    Apr 2008
    Location
    Spain
    Posts
    194

    Thumbs up Re: Custom querys???

    other question....

    how we launch this custom query????

    is there any way to do this by clicking on a button or something else???

    thanks
    Sugar Version : 5.0.0e
    Sugar Edition : SugarCE
    Category : Campaigns,contacts,pop-ups,etc
    Operating System : (Ubuntu Server 7.10 gutsy gibbon)
    PHP Version : PHP 5.2.3-1ubuntu6.3 (cli) (built: Jan 10 2008 09:38:37)
    Database : MySQL Client Version 5.0.45
    Web Server : Apache 2.2.4
    Browser : Mozilla/5.0 (X11; U; Linux i686; es-ES; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14
    Hardware:
    1 Gb de ram
    Procesador Intel pentium 4 CPU 1,70 Ghz
    Testing Computer
    EUVE European Virtual engineering
    http://www.euve.net/es/index.asp
    Vitoria-Gasteiz
    Basque Country
    Spain

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Custom querys Sql Sugarcrm????
    By ezcurrax in forum Help
    Replies: 0
    Last Post: 2008-04-23, 09:00 AM
  2. upgraded to 4.5.1e, received "Metadata for table tracker does not exist"
    By sfgeorge in forum Installation and Upgrade Help
    Replies: 0
    Last Post: 2007-09-03, 02:24 PM
  3. Replies: 0
    Last Post: 2006-12-20, 11:39 PM
  4. Asterisk Patch 1.1.0 Crash on logon
    By skyracer in forum Help
    Replies: 6
    Last Post: 2006-07-08, 06:30 AM
  5. Replies: 7
    Last Post: 2006-06-06, 07:56 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
  •