Results 1 to 3 of 3

Thread: Get custom field value beside account_name from popup

  1. #1
    zacc is offline Member
    Join Date
    Apr 2009
    Posts
    8

    Default Get custom field value beside account_name from popup

    hi,

    I have a custom field in Accounts module named source_code_c. I would like to get back the value of this field beside account_name when user pick up an Account in Account popup of Cases module edit layout. In Cases I created and put on the edit layout the same field. The popups serach contains this new field as a search criteria as well.

    pls help.

  2. #2
    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: Get custom field value beside account_name from popup

    Hi Zacc

    You need to add the attribute 'displayParams' on the field defs at the editviewdefs.php:

    PHP Code:
                'displayParams' =>
                array (
                  
    'field_to_name_array' => array(
                    
    'id' => 'accounts_tenyaccounts_ida',
                    
    'name' => 'accounts_test_company_name',
                    
    'source_code_c' => 'source_code_c',
                  ),
                  
    'additionalFields' => array(
                    
    'source_code_c' => 'source_code_c',
                  ),
                ), 
    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.

  3. #3
    zacc is offline Member
    Join Date
    Apr 2009
    Posts
    8

    Default Re: Get custom field value beside account_name from popup

    thanx the answer. it works (and sorry, I've found your same advice in other threds just had not understood)

    but I still confused.
    how was filled the account_name earlier if there's no 'displayParams' =>... code in the editviewdefs.php file?

    and why wrote you these strange values:
    'id' => 'accounts_tenyaccounts_ida',
    'name' => 'accounts_test_company_name',

    I had to modify them to:
    'id' => 'account_id',
    'name' => 'account_name',

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. account_name field vanished
    By Myrko in forum Help
    Replies: 1
    Last Post: 2009-02-14, 10:31 AM
  2. Adding custom field to listview in popup picker?
    By Systems Navigator in forum Developer Help
    Replies: 1
    Last Post: 2007-12-17, 08:53 AM
  3. custom field and popup
    By guvencacarkan in forum Developer Help
    Replies: 0
    Last Post: 2007-07-27, 03:19 AM
  4. Adding custom field to popup picker?
    By sugapablo in forum Developer Help
    Replies: 3
    Last Post: 2007-07-05, 07:46 PM
  5. Replies: 0
    Last Post: 2006-05-04, 10:13 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
  •