Results 1 to 3 of 3

Thread: Include fields from Custom Module in Contacts Search

  1. #1
    jcb23 is offline Sugar Community Member
    Join Date
    Sep 2007
    Posts
    70

    Default Include fields from Custom Module in Contacts Search

    Windows XP and Vista
    Sugar 5.1.0
    Apache 2.2.4
    PHP: 5.2.3-1ubuntu6.3
    MySQL Server: 5.0.45-1ubuntu3.3

    I've created a module using the module builder and related it to the contacts module. Now I'm wondering if its possible to include fields from the module I've created in the search areas for the contacts module. Does anyone know how to do this?

    jcb23

  2. #2
    lowJack01 is offline Sugar Community Member
    Join Date
    Sep 2007
    Location
    Albuquerque, NM
    Posts
    86

    Default Re: Include fields from Custom Module in Contacts Search

    Check out:

    <sugar_root>/modules/Contacts/metadata/SearchFields.php
    Thank you,

    Jackie Trent
    Independent Contractor
    Sugar - 5.0.0d, 5.0.0f
    PHP Version 5.1.6
    MySQL 5.0.58

  3. #3
    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: Include fields from Custom Module in Contacts Search

    Quote Originally Posted by jcb23
    Windows XP and Vista
    Sugar 5.1.0
    Apache 2.2.4
    PHP: 5.2.3-1ubuntu6.3
    MySQL Server: 5.0.45-1ubuntu3.3

    I've created a module using the module builder and related it to the contacts module. Now I'm wondering if its possible to include fields from the module I've created in the search areas for the contacts module. Does anyone know how to do this?

    jcb23
    Hi jcb23

    You need to create a custom controller for the Contacts module: custom/modules/Contacts/controller.php
    You need to override the method action_listview inside which you redefine the $this->bean to another class object that extends the Contact class.
    Inside this new class you override the create_new_list_query which should define the join between the contacts and custom module tables.

    Let me know if you need additional help.

    Cheers
    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.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 6
    Last Post: 2011-03-29, 10:40 AM
  2. HOWTO - Enhance ModuleBuilder generated modules to include AJAX
    By kenneth.thorman in forum Developer Tutorials
    Replies: 10
    Last Post: 2009-01-16, 05:53 PM
  3. Accounts Basic Search causes search in custom module
    By Kirch in forum Developer Help
    Replies: 2
    Last Post: 2008-01-23, 06:51 PM
  4. Custom module search problems
    By purplewave in forum Developer Help
    Replies: 4
    Last Post: 2007-12-26, 02:25 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
  •