You need to sign in to do that
Don't have an account?
Lori Vardi
Clear sObject field value
Hi,
Im using salesforce java api-core 1.0.3 and im trying to clear a field using the sObject apis.
I tried to use setField with null or empty string or to use removeField with no success.
What is the way to clear a custom field value using java APIS?
Im using salesforce java api-core 1.0.3 and im trying to clear a field using the sObject apis.
I tried to use setField with null or empty string or to use removeField with no success.
What is the way to clear a custom field value using java APIS?
Add you field to fieldsToNull Array of one or more field names whose value you want to explicitly set to null.
https://www.salesforce.com/developer/docs/api/Content/sforce_api_calls_concepts_core_data_objects.htm#i1421117
Let us know if it helps.
All Answers
Add you field to fieldsToNull Array of one or more field names whose value you want to explicitly set to null.
https://www.salesforce.com/developer/docs/api/Content/sforce_api_calls_concepts_core_data_objects.htm#i1421117
Let us know if it helps.
unfotunatliy im using com.palominolabs.crm.sf.rest that doesn't have these setters and getters.
Can you think of a way to do it otherwise?
Im using a third party connector https://github.com/palominolabs/sf-api-connector to update salesforce objects from our backend system, via rest apis.
As i already mentioned im trying to clear fields value unfortunatly in that implementation there is no setFieldsToNull method:
https://github.com/palominolabs/sf-api-connector/blob/master/api-core/src/main/java/com/palominolabs/crm/sf/core/SObject.java
Can you think of a way to do it without changing my sf connector?
Please try below code to insert a new object .
Let us know if it helps.
Accutally putting field with null value works now, I thought it didn't work but it was because of a diffrent reason. The third party put it as fieldsToNull when null is defined.
Thank u for your help,