Results 1 to 3 of 3

Thread: Soap: set_entry with multiple fields

  1. #1
    msaint75 is offline Junior Member
    Join Date
    Apr 2009
    Posts
    2

    Default Soap: set_entry with multiple fields

    Hi,
    My set up is the following
    Sugar on Demand 5.2 Professional

    Website where I make the call to sugar from LAMP with php 5.2.5

    I can successfully create a record with set_entry as long as I set only one field. If I attempt to set 2 fields like in the below example it fails with the error below… Any ideas of what’s wrong?
    Thanks!
    <?php
    require_once('inc/sugarConfig.php');

    $client = new SoapClient($sugar_config['url'] . 'soap.php?wsdl');


    $result = $client->login(array('user_name'=>$sugar_config['user'],'password'=> md5($sugar_config['pass']), 'version'=>'1.0'),'soapleadcapture');
    /**
    * CHECK FOR ERRORS
    */
    if(is_object($result))$result =objectToArray($result);
    printf("\n\nLogin in process\n\n");
    if($result['error']['number'] != 0)die($result['error']['description']);
    /**
    * GET THE SESSION ID WE WILL BE USING FOR THE REST OF THE TRANSACTIONS
    */
    $session_id = $result['id'];
    $user_id = $client->get_user_id($session_id);
    printf("\n Session Id is :".$session_id." user Id is: ".$user_id."\n\n");



    // create a new lead record and grab its ID

    // this one works fine
    //$response = $client->set_entry($session_id, 'Leads', array(array("name" => 'last_name',"value" => 'mimi')));
    // this one fails…
    $response = $client->set_entry($session_id, 'Leads', array(array("name" => 'last_name',"value" => 'mimi'),array("name" => 'first_name',"value" => 'lilie')));
    var_dump($response);


    /**
    * DISCONNECT FROM SUGAR
    */
    $client->logout($session_id);
    ?>

    Fatal error: Uncaught SoapFault exception: [HTTP] Internal Server Error in /home/th/public_html/temp/soap.php:43 Stack trace: #0 [internal function]: SoapClient->__doRequest('<?xml version="...', 'http://th...', 'http://www.th...', 1, 0) #1 [internal function]: SoapClient->__call('set_entry', Array) #2 /home/th/public_html/temp/soap.php(43): SoapClient->set_entry('sj658hmic1au1sb...', 'Leads', Array) #3 {main} thrown

  2. #2
    Join Date
    Jun 2009
    Posts
    5

    Default Re: Soap: set_entry with multiple fields

    I have the same error here, did you fix it?

    Thanks

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

    Question Re: Soap: set_entry with multiple fields

    Me too, what is the solution?

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Set_entry XML fields empty on SOAP call
    By jsgoecke in forum Developer Help
    Replies: 2
    Last Post: 2008-11-28, 07:05 PM
  2. SOAP: set_entry not working
    By Developer58 in forum Developer Help
    Replies: 7
    Last Post: 2008-09-09, 05:04 PM
  3. SOAP set_entry not working
    By monkey in forum Developer Help
    Replies: 11
    Last Post: 2008-04-15, 12:33 PM
  4. SOAP set_entry errors
    By ibutler in forum Developer Help
    Replies: 0
    Last Post: 2007-07-11, 08:33 PM
  5. SOAP API set_entry
    By Shearer in forum Help
    Replies: 1
    Last Post: 2006-12-18, 05:08 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
  •