You need to sign in to do that
Don't have an account?
David_FB
PHP: fieldsToNull with an array of field names - unexpected element
I'm having an issue with 'fieldsToNull' and PHP Toolkit 13. I can't pass through an array of field names without getting this error:
$sObject->fieldsToNull = array('Current_Projects__c', 'About_Me__c');
Unexpected element {http://www.w3.org/2001/XMLSchema}string during simple type deserialization
Though, if I do:
$sObject->fieldsToNull = 'Current_Projects__c';
This will work fine, and set the field to null. But doesn't solve my problem of being able to set multiple field values to null.
Has anyone encountered this issue before?
All Answers
I've also tried the sample shown here. I only changed the paths to the toolkit, and the username and password.
The object is created fine. Though on update, when trying to set fieldsToNull, I get the same error. Is there somewhere I can submit a bug?
Thanks for your reply. Using the Partner client, it worked fine. Besides it working with the Partner client, are there any other reasons why I should use that over the Enterprise client?
Also, I guess that this means there is a bug with the Enterprise client and fieldsToNull?
I know that this is an old thread, but our R&D found that the issue with fieldsToNull is still there: using Enterprise WSDL to set multiple fields to null in a CUSTOM OBJECT does not work.
As @david_FB stated we are not 'able to set multiple field values to null.'
This issue is still here, even after 6 years it was reported in this thread.
We also looked into SalesForce Known Issue but this is not documented at all. This surprised us.
We also opened a case #15150555 asking SalesForce to provide feedback about their awareness of the issue and an estimated time to deploy a fix.
This is quite surprising so maybe we are missing something and just need to be pointed in the right direction.
For example, if Partner WSDL allowed to manage and set to null multiple fields on custom objects, then maybe we should just use it (in case they are included in the Enterprise license we have).
This thread will be referenced within the case so that SalesForce support can be updated about this. We hope that this time spent to provide precious information that allow SalesForce to improve as a product is used properly to improve.
Thanks for anyone providing feedback here.