Results 1 to 6 of 6

Thread: Related Fields / How do I change whats Displayed?

  1. #1
    paulakg4 is offline Member
    Join Date
    Aug 2009
    Posts
    17

    Default Related Fields / How do I change whats Displayed?

    Im using all custom fields and having some problems.

    I created the field called 'Purchased By' and relate it to my client module.
    In my client module I dont use the field 'Name' but a custom field called 'Full Name'

    So the problem is when I select the Client from the list it pulls an empty field into the related Purchased By field.

    Is it possible to define the field that is shown in the related field?

    Thanks in advance.

  2. #2
    salesagility's Avatar
    salesagility is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    2,379

    Default Re: Related Fields / How do I change whats Displayed?

    Yes, but you'd have to hack the code. There's no way to do this using Studio.

  3. #3
    paulakg4 is offline Member
    Join Date
    Aug 2009
    Posts
    17

    Default Re: Related Fields / How do I change whats Displayed?

    Here is the vardef entry for the Field:

    'sponsored_by' =>
    array (
    'required' => false,
    'source' => 'non-db',
    'name' => 'sponsored_by',
    'vname' => 'LBL_SPONSORED_BY',
    'type' => 'relate',
    'massupdate' => 0,
    'comments' => '',
    'help' => '',
    'importable' => 'true',
    'duplicate_merge' => 'disabled',
    'duplicate_merge_dom_value' => '0',
    'audited' => 0,
    'reportable' => 0,
    'len' => '255',
    'id_name' => 'aac00_person__id_c',
    'ext2' => 'AAC00_Person_',
    'module' => 'AAC00_Person_',
    'quicksearch' => 'enabled',
    'studio' => 'visible',

    I would like for the field Sponsored_By to pull the full_name field from the Person_ module

    Im no programmer but I can usually figure these things out, from what ive read I think I change the id_name field? Is this correct?

  4. #4
    salesagility's Avatar
    salesagility is offline Sugar Community Member
    Join Date
    Aug 2006
    Location
    UK
    Posts
    2,379

    Default Re: Related Fields / How do I change whats Displayed?

    Enhanced Studio in the SugarForge may help you:

    http://www.sugarforge.org/projects/enhancedstudio/

  5. #5
    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: Related Fields / How do I change whats Displayed?

    Hi Paula

    I believe the easiest approach is to implement the method save into class of your client module (is that a custom one?), if not implement a logic_hook before_save. This method save should copy the content of fullname into name itself.

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

  6. #6
    paulakg4 is offline Member
    Join Date
    Aug 2009
    Posts
    17

    Default Re: Related Fields / How do I change whats Displayed?

    Awesome, exactly what I was looking for!!
    Thanks for the link, EnhancedSudio answers a ton of questions I havent gotten around to asking yet.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 2008-07-05, 05:24 PM
  2. Replies: 5
    Last Post: 2008-01-07, 12:11 PM
  3. Creating Fields - calculated fields and 'related' field
    By gipps in forum General Discussion
    Replies: 0
    Last Post: 2007-07-21, 10:17 PM
  4. Change data displayed in history tab
    By christineeff in forum Developer Help
    Replies: 0
    Last Post: 2007-07-02, 08:39 AM
  5. custom fields not displayed.
    By dineshs in forum Developer Help
    Replies: 3
    Last Post: 2007-02-09, 07:26 AM

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
  •