jsforce icon indicating copy to clipboard operation
jsforce copied to clipboard

Bulk API results do not include "created" property

Open paustint opened this issue 7 years ago • 1 comments

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 ] : []
        };
      });

paustint avatar Aug 07 '18 23:08 paustint

Care to open a PR?

kmanzana avatar May 25 '20 18:05 kmanzana

This should be fixed in v3, see: https://github.com/jsforce/jsforce/discussions/1529

cristiand391 avatar Jul 15 '24 19:07 cristiand391