You need to sign in to do that
Don't have an account?
moeoo
Update method - to override with empty string
Hi All
I've created the custom field with create method. Then I want to update the field value with empty string but it didn't update the value. Following is the example code;
//Create customer
Customer__c objCustomer = new Customer__c();
objCustomer.Account__c = "1234"; //String data type
SaveResult[] sr = binding.create(new sObject[] { objCustomer });
//Update customer
objCustomer.Account__c = "";
objCustomer.Id = _SalesforceID;
SaveResult[] sr = binding.update(new sObject[] { objCustomer });
I want the Account__c value to be empty string but it is not updated. If I put some value (e.g "1122"), it is updated.
Do I need to set any other value if I want to pass empty string?
Thanks in advance
Moe
objCustomer.fieldsToNull = new String [] { "Account__c" };