Update returns true, but doesn't update fields

So I am trying to update a custom objects fields through the API, and it says that it is working, but the fields don't update. It's a simple text field I am trying to update. Here is my code:

$sObject = new sObject(); $sObject->Id = RECORD_SFID; $sObject->Lead_Source__c = 'Lead Source'; $sObject->Lead_Source_Detail__c = 'Lead Source Detail'; $sObject->type = 'Lead_Sources__c'; $res = $sf->update([$sObject], 'Lead_Sources__c'); 

This returns

stdClass Object (     [id] => RECORD_SFID     [success] => 1 ) 

But none of the fields are updated. I have an updated wsdl and the fields are writeable by the API. Any ideas on why this would be happening?

Replay

Figured it out. Malformed sObject. Fields should have been in an array.

Category: api Time: 2016-07-29 Views: 0
Tags: php api update wsdl

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.117 (s). 12 q(s)