Results 1 to 2 of 2

Thread: Displaying different module's field in ListView

  1. #1
    robind2 is offline Member
    Join Date
    Apr 2010
    Posts
    16

    Default Displaying different module's field in ListView

    Hello,

    Currently I have two modules, Leads and Clients, and on the Leads module, there is a field called 'Lead Status'. Each lead record can be related to a client record of course. We want to be able to show this 'Lead Status' field on the Clients' ListView page. Anyone have any hints as to how to accomplish this?

    Thanks,
    D

  2. #2
    davidboris is offline Sugar Community Member
    Join Date
    May 2010
    Posts
    1,113

    Default Re: Displaying different module's field in ListView

    Hello,

    Create a file custom/Extension/modules/Contacts/Ext/Vardefs/lead_status.php

    Add following lines of code, change <YOUR_RNAME> to whatever field of leads you want to display

    PHP Code:
    $dictionary['Contact']['fields']['lead_stat'] =
    array (
            
    'name' => 'lead_stat',
            
    'rname' => '<YOUR_RNAME>',
            
    'id_name' => 'id',
            
    'vname' => 'LBL_LEAD_STATUS',
            
    'type' => 'relate',
            
    'link' => 'leads',
            
    'table' => 'leads',
            
    'isnull' => 'true',
            
    'module' => 'Leads',
            
    'dbType' => 'varchar',
            
    'source' => 'non-db',
    ); 
    Add the following code in custom/modules/Contacts/metadata/listviewdefs.php

    PHP Code:
    'LEAD_STAT' => 
      array (
        
    'default' => true,
        
    'label' => 'LBL_LEAD_STATUS',
        
    'width' => '10%',
      ), 
    Thumbs up.

    Skype ID - david__boris

    SugarForge Projects:

    WYSIWYG now in studio!(Version 1.1 is out now!)

    Sugar Feeds on your personalized home pages like iGoogle, My Yahoo!, etc.

    Fab Tools! > Dashlet Not Followed Opportunities for past six Months

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 2010-03-09, 02:37 AM
  2. Replies: 3
    Last Post: 2009-09-17, 03:50 AM
  3. Displaying a linked field in a listview
    By wrboyce in forum Developer Help
    Replies: 1
    Last Post: 2009-03-26, 11:19 AM
  4. Searching by related module's field
    By dusker in forum Developer Help
    Replies: 1
    Last Post: 2008-11-12, 02:28 PM
  5. Replies: 0
    Last Post: 2006-10-27, 10:57 PM

Tags for this Thread

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
  •