You need to sign in to do that
Don't have an account?
How to clear the value of a field through REST API?
I have a .NET service I'm building to give me access to the data in Salesforce. I'm trying to get my update method(s) to work. Specifically, I need to know how to clear the value of a field in Salesforce. I presumed that since we're using JSON to pass the data back and forth that I can just set the field to null in the JSON string and Salesforce will clear the current value. That appears to not be the case, or I'm just plain dumb. For example if I post {"Invoice__c":"blah blah blah"} it works fine. But if I post {"Invoice__c":null,"Finish_Date__c":null,"Scheduled_Date_Time__c":"\/Date(1333526400000)\/","Walk_Date_Time__c":null} nothing happens. I don't even get an error message back. It simply doesn't work.
Am I doing something wrong (I obviously must be doing something wrong)? How do I correct this?
Thanks in advance for any help!
hi,
u can assign null values as
Invoice.fieldsToNull = new string[] { "Invoice__c", "Finish_Date__c" };
Komathipriya, there is no Invoice object to set that on. Unless you mean Invoce to be the Json object. and that does not work (SF responds sayign there is no fieldsToNull object)