6

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?

3 Answers 3

8

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.

2
  • Hi, do you still recommend using your extension over the salesforce extension pack? can they be used together with no negative effects?
    – Bahman.A
    Commented Mar 8, 2021 at 16:23
  • 1
    @Bahman.A Yes, they can! There is a setting in the official extension for AutoSave that should be turned off! Commented Mar 8, 2021 at 16:26
3

I'm pretty certain this is simply a feature that doesn't exist yet. I would recommend Mohith Shrivastava's extension that adds some of these missing features (plus cool things like deploy-on-save). You can find this directly from VS Code's extension search or clicking on the link in the README file.

10
  • 1
    It does exist in beta.
    – Jayant Das
    Commented Feb 17, 2019 at 19:09
  • @JayantDas I'm not referring to the CLI feature, but rather the Salesforce Extensions bundle. Yes, you can deploy against any org (and it works quite well), but there's no GUI for it in the official bundle, which is the purpose of the question.
    – sfdcfox
    Commented Feb 17, 2019 at 19:12
  • 1
    Actually there is a GUI available, refer this. I have been using this of late for my DE orgs.
    – Jayant Das
    Commented Feb 17, 2019 at 19:13
  • 2
    @JayantDas Huh. I actually don't have the options on my package.xml, either. I'll have to dig deeper in to this, although I still say Mohith's extension has been a massive time saver, since I don't even have to remember to deploy.
    – sfdcfox
    Commented Feb 17, 2019 at 19:49
  • 1
    The odd thing is, these context menu links showed up previously for me. Also missing is the context menu options to retrieve and deploy when I right-click on individual classes or other files within my project. I GREATLY miss being able to retrieve and deploy specific files this way.
    – SF1Dev
    Commented Feb 17, 2019 at 21:48
1

This issue was happening because my project was missing a properly configured sfdx-config.json file in the .sfdx folder.

If you successfully follow the documentation for creating and configuring your project here: https://forcedotcom.github.io/salesforcedx-vscode/articles/user-guide/org-development-model then the sfdx-config.json file should be generated right after you perform the "SFDX: Authorize an Org" step detailed in that documentation.

In my case though, executing that step seemed to work however upon closer examination it did not completely work as the Output window in VSCode shows the error "ERROR: grant type not supported."

I believe this to be due to a configuration issue in my org since I have found that in other Sandbox orgs I have access to, this whole process works great.

Even in an org in which I get the "ERROR: grant type not supported." error, if I manually create the sfdx-config.json file in the .sfdx folder, the SFDX: Retrieve Source in Manifest from Org and the SFDX: Deploy Source in Manifest to Org options reappear in the Explorer's right-click context menus, they just don't actually function due to the grant type configuration issue in my org.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .