function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
LarryKreegerLarryKreeger 

How do you update a field to null?

Here is basically what I do.

 

$sObject1 = new SObject();

$sObject1->fields = $fieldsToUpdate;

$sObject1->type = 'Lead';

$sObject1->Id = $record->Id;

$response = $mySforceConnection->update(array ($sObject1));

 

This works great until I change a value to null.  :)

Best Answer chosen by Admin (Salesforce Developers) 
ptepperptepper

All Answers

ptepperptepper
This was selected as the best answer
LarryKreegerLarryKreeger
Thanks  :)
ez76ez76

fieldsToNull is broken in the enterprise PHP toolkit when nulling more than one field.

 

It may be an underlying issue in the PHP SoapClient on which the toolkit depends, but broken is broken.