0

Hello I have created a LWC project in VS Code but the "SFDX: Deploy Source to Org" option is missing when I Right-click the default folder under force-app/main.

I have authorized the org and set a default scratch org.

Please help.

enter image description here

2 Answers 2

1

Adding my answer in case anyone is as stupid as I am:

I accidentally opened the parent folder in vscode, so vscode did not see the project as a salesforce project.

Sign up to request clarification or add additional context in comments.

Comments

0

For scratch orgs it's more "natural" to push and pull the changes, let SFDX figure out what changed on your system / what changed server-side (new field, new report? new object? good luck spelling it all out in package.xml, life is too short for it). The team behind VSCode sfdx plugin made conscious decision to hide these options.

Try with sfdx force:source:push. If you need single file there's still source-ish deploy command (will warn you if you're overwriting something changed on server / by another dev and you can force deploy if you want).

https://developer.salesforce.com/tools/vscode/en/user-guide/development-models

https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_develop_any_org.htm

The deploy-retrieve are old school metadata api commands

2 Comments

Hi @eyescream, do you have any further sources regarding your statement "The team behind VSCode sfdx plugin made conscious decision to hide these options." ? I'm interested in why this useful function was hidden, since (at least for me) it is much faster processing-wise to explictly deploy a single file instead of letting source tracking figure out what to deploy. Is there any way to regain the "Push source to org" menu entries when right-clicking a file?
github.com/forcedotcom/salesforcedx-vscode/… you'll see there are multiple tickets complaining and the team doesn't budge / takes forever to improve it. See /issues/3953, /issues/1696, /issues/1449, /issues/1462 ("The Deploy and Retrieve commands are only available through the UI when developing against a non-scratch org"), /pull/555... Also deploy is "f*** it, my version of the file is best, overwrite other people's changes" while push/pull checks for conflicts bit like Git PRs (/issues/971)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.