developerforce/Force.com-Toolkit-for-PHP

Can't create Contact and Opportunity in the same create() call using Partner Client

Opened this issue · 2 comments

According to docs, https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_create.htm , I should be able to create a Contact and Opportunity in a single create() call.

Instead, when I try to do so using the toolkit i get the following error:

PHP Fatal error: SOAP-ERROR: Encoding: object has no "'type' property" salesforce

Breaking the exact same set of objects into two separate create()s works as expected.
I've tried both with and without "fields" array.

php 5.5.26, API version 34.0

What other info can i provide to help debug?

OK, the PHP client was choking because I was sending a non-sequentially-indexed array of sobjects.

Why does the client care about the indexes?
Is this a PHP-SOAP level thing, or something on the SF API end of things?

hi ,
Facing the same problem and same error?
Any updates on this

error log object has no 'type' property in /var/www/html/asdfghj/soapclient/SforceBaseClient.php