Discussions
- General Development
- Schema Development
- Apex Code Development
- Visualforce Development
- Formulas & Validation Rules
- Security
- Mobile
- Force.com Sites & Site.com
- Chatter Development
- Java Development
- .NET Development
- Perl, PHP, Python & Ruby
- Desktop Integration
- APIs and Integrations
- Visual Workflow
- Apple, Mac and OS X
- VB and Office Development
- AppExchange Directory & Packaging
- Salesforce Labs & Open Source Projects
- Other Salesforce Applications
- Jobs Board
- Force.com Discussion Boards
- :
- Developer Boards for Force.com and Database.com
- :
- Perl, PHP, Python & Ruby Development
- :
- Problem with PHP toolkit 20.0?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
Problem with PHP toolkit 20.0?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
11-27-2012 02:36 AM
I'm not the resident PHP developer, but our resource in-house has had the following issue:
We tried to upgrade our system from the Salesforce Partner PHP toolkit v11 to the latest v20.
However, we started experiencing some very strange results as soon as we switched to the new libraries. To confirm, we kept all the old working queries as is, so the issue is not with how we query or manipulate the data. The issue is that what Salesforce returns using the v20 toolkit is radically different and looks corrupt.
We can switch the libraries back and forward (old and new) to produce the results below.
V11 returned the Object like:
SObject Object
(
[type] => PricebookEntry
[fields] => SimpleXMLElement Object
(
[UnitPrice] => 8.04
[CurrencyIsoCode] => GBP
)
[sobjects] => Array
(
[0] => SObject Object
(
[type] => Product2
[fields] => SimpleXMLElement Object
(
[Carbon_Database_id__c] => 12.0
[Id] => 01t20000000iTW4AAM
[Name] => Big River Salmon Creek Forestry
[Family] => Carbon Instruments
[IsActive] => true
)
[Id] => 01t20000000iTW4AAM
)
[1] => SObject Object
(
[type] => Pricebook2
[fields] => SimpleXMLElement Object
(
[Name] => 3) >= 5
[IsActive] => true
)
)
)
)
V20 returned the Object like:
stdClass Object
(
[type] => PricebookEntry
[Id] =>
[any] => Array
(
[Product2] => stdClass Object
(
[type] => Product2
[Id] => Array
(
[0] => 01t20000000iTW4AAM
[1] => 01t20000000iTW4AAM
)
[any] => <sf:Carbon_Database_id__c>12.0</sf:Carbon_Database _id__c><sf:Id>01t20000000iTW4AAM</sf:Id><sf:Name>B ig River Salmon Creek Forestry</sf:Name><sf:Family>Carbon Instruments</sf:Family><sf:IsActive>true</sf:IsAct ive>
)
[Pricebook2] => stdClass Object
(
[type] => Pricebook2
[Id] =>
[any] => <sf:Name>3) >= 5
)
[0] => <sf:UnitPrice>8.04</sf:UnitPrice><sf:CurrencyIsoCo de>GBP</sf:CurrencyIsoCode>
)
)
Notice how unstructured and a mess this is, it has jumbled all the relevant data into these <sf: tags.
This issue occurred on the first Query, here are the bones of that part:
$response = $mySforceConnection->query($query);
$queryResult = new QueryResult($response);
foreach ($queryResult->records as $record) {
print_r($record);
Does anybody know why the change from Version 13 to version 20 might have caused this change?
Re: Problem with PHP toolkit 20.0?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-30-2012 02:09 PM
Hello,
I'm seeing the same issues, did you find a resolution to this problem?
Re: Problem with PHP toolkit 20.0?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
12-31-2012 01:42 AM
We hadn't. Ended up just having to stick with version 13 for now. Not ideal.
Re: Problem with PHP toolkit 20.0?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
01-17-2013 11:50 AM
Having the same issue here.

