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 rename create to insert #552

Open
mtuchi opened this issue May 8, 2024 · 2 comments
Open

salesforce rename create to insert #552

mtuchi opened this issue May 8, 2024 · 2 comments
Assignees

Comments

@mtuchi
Copy link
Collaborator

mtuchi commented May 8, 2024

Description

Salesforce create() function should be renamed as insert() because that is what the DB operation is called in salesforce.

Is there a way to make this change but also ensure backwards compatibility with jobs that use create()?

Context

When we use the word “create” the user thinks we’re creating metadata, instead of “inserting” data into an existing table/object

@mtuchi
Copy link
Collaborator Author

mtuchi commented May 30, 2024

According to jsforce, create is synonym of insert. The recommended approach is we add an alias for insert which is similar to create.

Screenshot 2024-05-30 at 5 01 44 PM

Another recommendation is we improve the documentation to clearly state create() function. Only creates new sObject record. Does not create sObject metadata

@josephjclark
Copy link
Collaborator

Sorry @mtuchi I was supposed to leave a comment on this - got distracted

That's a useful bit of documentation. If create and insert are synonyms then I'm quite happy to alias it in the adaptor. Doing anything more dramatic that needs some serious consideration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In review
Development

No branches or pull requests

2 participants