You need to sign in to do that
Don't have an account?
sean_at_33050
iterate through getupdatedresult in PHP
Very simple question:
I have the follwing:
Code:
which produces something like this:
$startDate = date('Y-m-d\TH:i:s.000+00:00', mktime(0, 0, 0, 11, 01, 2006)); $endDate = date('Y-m-d\TH:i:s.000+00:00', mktime(0, 0, 0, 11, 15, 2006)); echo $startDate ."<br>"; echo $endDate ."<br>"; $result = $mySforceConnection->getUpdated('Batch__c',$startDate, $endDate ); print_r( $result );
which produces something like this:
Code:
(the "a003000.." being real salesforce object Ids)
stdClass Object ( [ids] => Array ( [0] => a00300000... [1] => a00300000.... [2] => a003000000...
(the "a003000.." being real salesforce object Ids)
Can someone post an example PHP code segment that "gets the ids" from $result object?
Here's what I tried so far:
Code:
Also, anyone know of any practical ("By example" type) guides for learning to use objects?
if (is_array($result)) { // <- never true— $resultSize = count($result); for ($i = 0; $i < $resultSize; $i++) { echo $result[$i] ."<br>"; } } else { foreach( $result->ids as $r){ $r = new SObject($r); print_r( $r ); //$n = $r->ids; echo "<br>"; } }
Also, anyone know of any practical ("By example" type) guides for learning to use objects?
Thank alot.
Sean
sean_at_33050
This appears to work:
Code: