Results 1 to 5 of 5

Thread: get_entry_list result

  1. #1
    raffor is offline Member
    Join Date
    Feb 2007
    Posts
    6

    Default get_entry_list result

    what is the best way to retrieve all the data in one of the SugarCRM modules ( Contacts) , by using the SOAP api "get_entry_list "

    $search_list=$sugarClientProxy->get_entry_list($session_id,'Contacts',$query,$ord er_by,$offset,array('id','last_name'),$max_results ,$deleted);

    print_r($search_list); this is empty but j have more Contacts. Why???

    Thank you
    lello

  2. #2
    sanjaykatiyar1's Avatar
    sanjaykatiyar1 is offline Sugar Community Member
    Join Date
    Feb 2006
    Location
    Bangalore
    Posts
    600

    Default Re: get_entry_list result

    Try this for fetching all the contacts

    require_once "SugarSoap.php";
    $soap=new SugarSoap('http://mysugar/soap.php?wsdl'); // we automatically log in
    $result=$soap->getContacts(" contacts.email1<>'' ",5," contacts.last_name desc");
    if($result['result_count']>0){
    foreach($result['entry_list'] as $record){
    $array= $soap->nameValuePairToSimpleArray($record['name_value_list']);
    echo $array['first_name'] . " " . $array['last_name'] . " - " . $array['email1']. "<br>";
    }
    } else {
    echo "No contacts found";
    }

    More details here:

    http://www.beanizer.org/index.php3?page=sugar1&pnum=1
    Sanjay Katiyar
    iPhone and Android solutions http://www.apptility.com

  3. #3
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: get_entry_list result

    Hey sanjaykatiyar1,

    What is this nameValuePairToSimpleArray function that you speak of?

  4. #4
    eggsurplus's Avatar
    eggsurplus is offline Sugar Community Member
    Join Date
    Dec 2005
    Location
    Minnesota
    Posts
    2,343

    Default Re: get_entry_list result

    I got impatient and wrote something that'll flatten the array out a bit:

    PHP Code:
    function nameValuePairToSimpleArray($sets) {
        
    $newarray = array();
        foreach ( 
    $sets as $set )
        {
            
    $newarray[$set['name']] = $set['value'];
        }
        
        return 
    $newarray;


  5. #5
    rayner.jrp is offline Junior Member
    Join Date
    Mar 2010
    Posts
    2

    Default Re: get_entry_list result

    How can I get the total number of elements with get_entry_list method?
    Actually, I get the number of elements used to show in the ListView pagination. How can I resolve that?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Adding "Account" info in the "Add invitees" search result list
    By george_bbch in forum General Discussion
    Replies: 1
    Last Post: 2011-09-29, 04:37 PM
  2. Narrowing down the default result set in a popup.
    By broon in forum Developer Help
    Replies: 2
    Last Post: 2007-01-24, 02:38 PM
  3. Replies: 2
    Last Post: 2006-05-15, 01:35 PM

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
  •