Force.com-Toolkit-for-NET
Force.com-Toolkit-for-NET copied to clipboard
Setting a date field to nothing doesn't get sent in the json
When using UpdateAsync, and passing an object with a datefield set to null or nothing, the json for that fields does not get sent up to salesforce. How do we set a datefield to not have a value?
Does this give you a '' is not a valid value for the type xsd:date
error?
It what I am getting when trying to do a BulkConstants.OperationType.Update
update.
No, when I set it to nothing (vb.net), the SDK does not send the value in the JSON payload. When you set it to a value, it gets included in the payload.
This still seems to be an issue, was originally discussed here: https://github.com/wadewegner/Force.com-Toolkit-for-NET/issues/197 and there was a pull request here: https://github.com/wadewegner/Force.com-Toolkit-for-NET/pull/268 but it doesn't look like all of the pull request was taken into the source so I don't believe there is yet a solution outside of running your own fork of the code...