Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for fieldsToNull for nulling out upserts/updates #28

Open
garrett528 opened this issue Apr 5, 2018 · 0 comments
Open

Comments

@garrett528
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant