-
Notifications
You must be signed in to change notification settings - Fork 10
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
Add helper for validating and format input data
#883
Conversation
salesforce
Add helper for validating and format input data
92ad6ae
to
f52468d
Compare
Hey @mtuchi we need super clear docs on this to avoid confusion in the future. I've updated the changeset to remove irrelevant stuff (users don't need to know about private internal APIs we've added) and to explain the changes. I've also added docs and example to each affected function. Can you just check that this looks all correct? Any other suggestions as to how to best communicate this? |
0f59e61
to
30f7177
Compare
Thanks @josephjclark for the suggestions edit. I made tiny changes to the error message to give user more context if they want to map relationship records |
use validatedNoDotKeys in upsert, update and create
30f7177
to
10b146e
Compare
Summary
Add utils helper
validateNoDotKeys
andflattenData
to help with validation of input data when usingupsert
,update
orcreate
and to transform nested object into a dot notation syntax when usingbulk
operation.Fixes #556
Details
When mapping a salesforce data model there is a bit of confusion on when to use the
dot notation
and when not to. Since the best practice when mapping objects is to always use a nested object for relationship, it's important that the adaptor adds a safe check when you forgot and use thedot notation
to map salesforce relationship. This PR adds two thingsupsert
,update
andcreate
function. This is achieved by the new util helpervalidateNotDotKeys
bulk
function. This is done by theflattenData
util helperAI Usage
Please disclose how you've used AI in this work (it's cool, we just want to know!):
You can read more details in our Responsible AI Policy
Review Checklist
Before merging, the reviewer should check the following items:
dev only changes don't need a changeset.