jsforce
jsforce copied to clipboard
Bulk API results do not include "created" property
When a user performs an upsert, a created boolean property is returned in the payload from SFDC, but this data is ignored in the response and is removed.
This data point should be included in the RecordResult object back from the API
Example: https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_batches_get_results.htm
Lines of code from docs
https://jsforce.github.io/jsforce/doc/api_bulk.js.html#line637
results = _.map(res, function(ret) {
return {
id: ret.Id || null,
success: ret.Success === "true",
errors: ret.Error ? [ ret.Error ] : []
};
});
Care to open a PR?
This should be fixed in v3, see: https://github.com/jsforce/jsforce/discussions/1529