AnsweredAssumed Answered

Cannot populate Custom field in module with SOAP call in SugarCE 6.5.16

Question asked by anespa anespa on Jun 28, 2014
Latest reply on Sep 12, 2015 by stufulford
Dear Friends,
 I am using SugarCE 6.5.16 . The problem is  cannot populate the Custom field in module with SOAP call (external data). all other module fields work eg : name and description has no problem.

Pls look my code  below and custom table fields

<html>
<head>
<title>Rimi Test</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<?php
    $username = "admin";
    $password = "sreekanth";
    $soapClient = new SoapClient("http://localhost/SugarCrm/service/v3_1/soap.php?wsdl");
    //print_r($soapClient);
    //exit("tyys");

try {
    $info = $soapClient->login(
        array(
            'user_name' => $username,
            'password'  => md5($password),
            )
        );
}
catch (SoapFault $fault) {
    die("Sorry, the service returned the following ERROR: ".$fault->faultcode."-".$fault->faultstring.".");
}
 
 //Dummy values from jBilling
 //$order_lines_values = array("Santoor","Soap","89","10","87","90","Test Description for future Reference.","13ae0ac1-2a6b-e674-b751-539abfc57439");
 //$order_values = array("WER098","USD","2014-07-02","2014-08-01","3 Month","JB09","13ae0ac1-2a6b-e674-b751-539abfc57439");
 
$session = $info->id;
//echo "Successful Login! Session ID {$session}n";

// Create/Edit Order & Order Line
try {
        $info = $soapClient->set_entry(
        $session,
        'Opportunities',
        array(
            //To Edit an existing entry
            //array("name" => "id", "value" => "10523bce-c611-860a-97ee-539abf92066b"),
            array('name' => 'name', 'value' => 'Dr Jifza M'),
            array('name' => 'order_date_c', 'value' => '2014-06-19'),
            array('name' => 'order_no_c', 'value' => 'ON908'),
            array('name' => 'amount', 'value' => '10000'),
            array('name' => 'due_date_c', 'value' => '2014-06-30'),
            array('name' => 'period_c', 'value' => '1 Month'),
            array('name' => 'next_billable_c', 'value' => '2014-07-19'),
            array('name' => 'jbilling_order_id_c', 'value' => 'JB098'),
            array('name' => 'account_id_c', 'value' => '1315a3bd-5246-562c-e771-539abf048f7b'),
            )
        );
       
       
       
        $info = $soapClient->set_entry(
        $session,
        'Cases',
        array(
            //To Edit an existing entry
            //array("name" => "id", "value" => "10523bce-c611-860a-97ee-539abf92066b"),
            array('name' => 'name', 'value' => 'BP apparatus'),
            array('name' => 'description', 'value' => 'Open the cash door'),
            array('name' => 'category_c', 'value' => 'After Shave'),
            array('name' => 'amount_c', 'value' => 900),
            array('name' => 'quantity_c', 'value' => 32),
            array('name' => 'sell_price_c', 'value' => 1000),
            array('name' => 'item_price_c', 'value' => 1200),
            array('name' => 'account_id_c', 'value' => '1315a3bd-5246-562c-e771-539abf048f7b'),
            )
        );
       
        //print_r($info);
        //exit("dfs");
       
}
catch (SoapFault $fault) {
  die("Sorry, the service returned the following ERROR:".$fault->faultcode."-".$fault->faultstring.".");
}
 
$accountId = $info->id;
echo "Created Account ID {$accountId}n";
exit();
?>



.... please advise me waiting your

fast reply

Outcomes