-
Notifications
You must be signed in to change notification settings - Fork 26
Description
Hey,
Was trying to see how to null out fields since the default behavior of upsert/update doesn't touch existing values if they are set and you are passing a null. Instead, you must use fieldsToNull and declare the fields that you want to null out. I was looking at the core objects documentation for SFDC and found the following https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_calls_concepts_core_data_objects.htm#i1421117
It would be nice to have something in your documentation stating that you can make use of the fields to null like this:
client.update('Account', Id: '0010W0000XXXXXX', fieldsToNull: ['Field1__c','Field2__c']) or
client.upsert('Account', 'Custom_Id__c', Custom_Id__c: '12', fieldsToNull: ['Field1__c','Field2__c'])
Just something that might save some people time and would be helpful on the ReadMe as well.