Force.com-Toolkit-for-NET
Force.com-Toolkit-for-NET copied to clipboard
Should we extend the SuccessResponse Object?
trafficstars
Since API v46, the response for the Upsert Request has changed in two significant ways
- The
createdparameter has been added to the successful response object. - Updates now return a 200 OK with a full body response instead of an empty response.
Previously I'd been using the existence of an Id in the response to indicate that the Upsert had created an object, and the lack of one to indicate an update to an existing object - this is no longer true.
At the moment, my code doesn't do much apart from logging the difference, but this might be more of an impact for others.
- Does anyone else see the need to expose the
Createdproperty? - Should this just be added to the standard
SuccessResponseobject, or should we look to modify the calls used by upsert from the general Patch requests to UpsertPatch requests that return anUpsertSuccessResponse?