[SalesForce] Unable to Retrieve Source from Sandbox

From the VSCode console, I have created a new project with the command:

sfdx force:project:create -n Integration --manifest

I then authorized a sandbox org with the command:

sfdx force:auth:web:login -r https://MySandboxURL -a Integration

After being prompted to close my browser, in VSCode I expand the manifest folder and right-click on the package.xml file. This is where the problem is… I don't see any SFDX related options in the context menu that appears. There's no Retrieve or Deploy Source in Manifest to from or to Org options.

I have tried repeating all of the steps and reinstalling all of the Salesforce extensions in VSCode without any luck.

What am I missing? How can I pull source from this sandbox?

Best Answer

The activation event for Salesforce's official extension is it looks for the file sfdx-project.json file in the workspace. Hence make sure you have the sfdx-project.json in the project workspace root folder.

Also, make sure you have .sfdx folder and also have an sfdx-config.json file with defaultusername set.

Also, try to reload the project using the reload command in command Palette. If the issue still persists feel free to post what your project structure looks like.

NOTE: The official extension has got better since I wrote the answer. It now has all the features that were missing and was supplemented by my extension.

Also yes I created another extension because the official extension has few issues that they are trying to figure still

1.Performance issues for saving single files. You can easily compare that what I have today is at least 2X faster than what you get from the official extension.

This is because they use Metadata API even for single file deploy which as per salesforce has performance issues and they plan to fix it in an upcoming release.

2.The package.xml generation is easier using changesets or unmanaged package container and the official extension does not offer a good GUI to generate them.

3.Official extension uses apex lang server for auto-completion that almost consumes a lot of my CPU. I would rather not have autocompleted than an extension trying to consume my whole CPU.

4.Official salesforce extension does not manage conflict with the server for Nonscratch orgs like sandboxes. It's in their roadmap.

5.Salesforce recommends using the new source format which I too recommend however if you are finding issues with that format the extension I have supports both DX typed source format and traditional source format.

Overall the idea of me building an extension was not to replace Salesforce's official extension instead supplement it with some missing capabilities till salesforce figures all of them.