Results 1 to 2 of 2

Thread: Related Modules via SOAP

  1. #1
    MateoLeFou is offline Senior Member
    Join Date
    Nov 2008
    Posts
    35

    Default Related Modules via SOAP

    I have a couple questions about fetching entry lists and their related beans:

    1) I have a field, "accound_id_c", in the contacts_cstm table, which is not being retrieved by a SOAP call on the Contacts module. I see that there is an account_id of type "relate" in the get_module_fields call, but I don't know how to use it. I have tried adding account_id, account_id_c, and `contacts_cstm`.`account_id_c` to the select_fields.

    2) Is it not possible to say, get_entry_list_and_related_entry_lists( etc... ) ?
    By this I mean I'd like to get Contacts and their related Account's name in a single SOAP call. As I see it, I'm going to have to get the Contacts, and loop over (severalhundred of) them with additional soap calls just to retrieve the "name" field from the associated Accounts beans.

    Several hundred SOAP calls is not going to work for me.

  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: Related Modules via SOAP

    Hi Mateo

    You can use the SOAP method get_entry_list:

    PHP Code:
        $result $soapclient->call(
            
    'get_entry_list',
            array(
                
    'session' => $session,
                
    'module_name' => 'Contacts',
                
    'query' => "<your_query>",
                
    'order_by' => '',
                
    'offset' => 0,
                
    'select_fields' => array(),
                
    'max_results' => 0
            
    )
        ); 
    You do not need to specify the fields you are going to fetch from soap, the soap api will return the full list of fields for each record.

    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. how to get related modules using soap.
    By gopalkalasa in forum General Discussion
    Replies: 0
    Last Post: 2008-12-30, 10:45 AM
  2. Search across related modules
    By dpeastman in forum Help
    Replies: 2
    Last Post: 2008-12-17, 06:35 PM
  3. Retreiving emails related to lead via SOAP
    By kent13304 in forum Developer Help
    Replies: 3
    Last Post: 2007-04-19, 12:36 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
  •