Results 1 to 7 of 7

Thread: Return details from Module B to Module A

  1. #1
    jvcampbell is offline Junior Member
    Join Date
    Dec 2010
    Posts
    3

    Default Return details from Module B to Module A

    Hi

    I'm new to sugarcrm, and am busy with the community edition.

    I've created a module that holds info.

    I want to include this information in the opportunities module.

    So if I've entered my Opportunities information, and I select a name/key value from my Custom Module, then it should return all the linked information and bind it too the Opportunity.

    I'm struggling to get this relatively easy (in theory) thing working .

    I've been looking at the referenced fields and module relationships, but I'm feeling like I'm bungling around in the dark.

  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: Return details from Module B to Module A

    Let us know what kind of information would you like to copy from Custom Module to Opportunities.

    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
    jvcampbell is offline Junior Member
    Join Date
    Dec 2010
    Posts
    3

    Default Re: Return details from Module B to Module A

    Hi

    I've got a module of properties.
    It would have a property code (the key).
    Then it would have info like no_bathrooms, no_bedrooms, property_type, estimate_value, estimate_date etc.

    So on the opportunity form, the user should be allowed to select the property code, and all the property information related to that property should be visible on the form.

    Thanks,
    J

  4. #4
    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: Return details from Module B to Module A

    Thsi may fit your needs.
    Add a code like that into Propery Field def at editviewdefs.php:

    PHP Code:
                'displayParams' => 
                array (
                  
    'field_to_name_array' => array(
                    
    'id' => 'accounts_tenyaccounts_ida',
                    
    'name' => 'accounts_test_company_name',
                    
    'billing_address_street' => 'billing_address_street',
                    
    'billing_address_city' => 'billing_address_city',
                    
    'billing_address_state' => 'billing_address_state',
                    
    'billing_address_country' => 'billing_address_country',
                    
    'billing_address_postalcode' => 'billing_address_postalcode',
                    
    'website' => 'website',
                    
    'phone_office' => 'phone_office',
                    
    'phone_fax' => 'phone_fax',
                    
    'phone_alternate' => 'phone_alternate',
                    
    'employees' => 'employees',
                    
    'annual_revenue' => 'annual_revenue',
                    
    'industry' => 'industry',
                    
    'account_type' => 'account_type',
                  ),
                  
    'additionalFields' => array(
                    
    'website' => 'website',
                    
    'phone_office' => 'phone_office',
                    
    'phone_fax' => 'phone_fax',
                    
    'phone_alternate' => 'phone_alternate',
                    
    'employees' => 'employees',
                    
    'annual_revenue' => 'annual_revenue',
                    
    'industry' => 'industry',
                    
    'account_type' => 'account_type',
                  ),
                ), 
    In this code the left side field is the source field (Property module) and the right side field is the target field.
    Obviously update it with your fields.

    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.

  5. #5
    jvcampbell is offline Junior Member
    Join Date
    Dec 2010
    Posts
    3

    Default Re: Return details from Module B to Module A

    Thanks for your quick response!

    Can the application not handle this kind of thing?

    Is custom dev the only way to get it done?

  6. #6
    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: Return details from Module B to Module A

    This is a customization you must accomplish by hand.

    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.

  7. #7
    z3r0 is offline Sugar Community Member
    Join Date
    May 2009
    Posts
    189

    Unhappy Re: Return details from Module B to Module A

    Sorry,

    if i bring up this old thread, but i have the same problem. This code
    PHP Code:
    'displayParams' => 
                array (
                  
    'field_to_name_array' => array( 
                    
    'id' => 'keycm_moduleb_id_c'
                    
    'name' => 'customfielda_c',
                    
    'description' => 'customfield2a_c',
                  ),
                  
    'additionalFields' => array( 
                    
    'description' => 'customfield2a_c',
                    ),
                ), 
    works but if change description to text ('text' is an ohter field in module B) this don't work, i don't understand this.
    don't work:
    PHP Code:
    'displayParams' => 
                array (
                  
    'field_to_name_array' => array( 
                    
    'id' => 'keycm_moduleb_id_c'
                    
    'name' => 'customfielda_c',
                    
    'text' => 'customfield2a_c',
                  ),
                  
    'additionalFields' => array( 
                    
    'text' => 'customfield2a_c',
                    ),
                ), 
    and no it is not text_c because i create this module and load it with the moduleloader, so "text" is a column in database.

    hoping for ideas...

    Edit: the solution is the last post of leowolff, see
    http://www.sugarcrm.com/forums/showthread.php?t=48165

    ps.: FAQ is terrible, I want sugar wiki !
    Last edited by z3r0; 2010-12-20 at 02:42 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 2012-02-22, 10:42 PM
  2. Details of Module loader
    By vishwas in forum Help
    Replies: 2
    Last Post: 2008-09-18, 02:23 PM
  3. Replies: 1
    Last Post: 2008-07-24, 11:31 PM
  4. Return data from module popup selection
    By rustinp77 in forum Developer Help
    Replies: 4
    Last Post: 2007-08-09, 11:51 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
  •