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

Trouble setting the User.IsActive field

I have the following code:

User userupdate = new User();
userupdate.Id = "005G0000003VyQuIAK"; // this is a legit ID, I checked
userupdate.IsActive = false;
binding.update(new sObject[] {userupdate}); // binding is my active connection to SFDC, and allows me to perform other actions no problem

But the user Active field is not updating. Am I missing something?

Best Answer chosen by jpgilbert
You also have to set the Specified flag, e.g. userupdate.IsActiveSpecified = true; is this a "feature" of the .NET soap stack, many types other than string have this additional specified flag that you need to set in order for it to send the value.