Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Salesforce: Issue with mapping and upserting a nested object using Salesforce adaptor #556

Open
AishaHassen opened this issue May 13, 2024 · 1 comment
Assignees
Labels
adaptor Related to one of the adaptors bug Something isn't working User Reported Issues from user reported bugs

Comments

@AishaHassen
Copy link

Mapping for an object using the Salesforce adaptor that has a relationship with another object(Openfn_Project__r) no longer works as per below:

'OpenFn_Project__r.Metrics_ID__c': 'id_value'

Getting the following error when doing the mapping like the above and using the upsert function from the salesforce adaptor

Upserting Deal__c with externalId Contract_ID__c : {
  Contract_ID__c: 'FCA2023',
  Start_Date__c: '2023-04-02T21:00:00.000Z',
  End_Date__c: '2023-06-29T21:00:00.000Z',
  Next_Steps__c: 'No',
  Asana_Link__c: 'https://app.asana.com/0/1204270101347732/1204277345786609',
  'OpenFn_Project__r.Metrics_ID__c': '4183'
}
[R/T] ✘ Failed step job-1 after 2.95s
[R/T] ✘ AdaptorError: No such column 'OpenFn_Project__r.Metrics_ID__c' on sobject of type Deal__c

I tried using both the bulk function(failed job code and job run using bulk function with dot operator for the mapping) and the upsert function([failed job code and job run using upsert function with dot operator for mapping).

The above method of mapping seems to be working in this project(checkout this blob)

Here is a successful job that is using the following format for mapping nested objects:
OpenFn_Project__r: { Metrics_ID__c: 'id_value' }

  1. Is it a bug on the adaptor version? Can we modify the adaptor so that mapping with a dot operator is also acceptable?
  2. Is it an intended feature, if yes can we modify the documentations?
@AishaHassen AishaHassen added bug Something isn't working adaptor Related to one of the adaptors labels May 13, 2024
@AishaHassen AishaHassen changed the title Issue with mapping and upserting a nested object using Salesforce adaptor Salesforce: Issue with mapping and upserting a nested object using Salesforce adaptor May 14, 2024
@aleksa-krolls
Copy link
Member

thanks @AishaHassen - adding to backlog!

@christad92 christad92 added the User Reported Issues from user reported bugs label May 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adaptor Related to one of the adaptors bug Something isn't working User Reported Issues from user reported bugs
Projects
Status: Backlog
Development

No branches or pull requests

4 participants