Closed mtuchi closed 11 months ago
@bryceVeraSolutions as @mtuchi flagged on Slack - please hold working on this issue until we cut a new Adaptor release on Monday
@bryceVeraSolutions new version of salesforce adaptor is available now, @openfn/language-salesforce@4.2.1
You can proceed now with implementation.
You can clean the existing adaptors version by running openfn repo clean
first before running openfn workflow.json -i -o tmp/output.json
Hiya @bryceVeraSolutions , sorry i forgotten to mention a crucial details about the bulkQuery
. You need to specify apiVersion: "59.0"
in your salesforce credentials
Regarding bulkQuery()
function failing for aggregate queries
It doesn't seem to be the issue with the adaptor function, rather it's limitation with Bulk API 2.0 It has a limitation on Parent-to-child relationship queries. (Child-to-parent relationship queries are supported.)
cc @bryceVeraSolutions
First workflow is done on this PR https://github.com/OpenFn/gife/pull/13 Thanks @bryceVeraSolutions
Summary
A new helper function for querying records in bulk is now available of salesforce adaptor
v4.2.0
.Update
jobs/getDeletedCampaignMembers.js
andjobs/getCampaignMembers.js
to use the newbulkQuery
function. and remove theoffset
query.Important thing to note, the result of the
bulkQuery()
function will be instate.data
not instate.references
So you have to updateconst campaignMembers = state.references.map(ref => ref.records).flat();
to useconst campaignMembers = state.data;