Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [visualstudiocode]

Visual Studio Code is a cross-platform source code editor developed by Microsoft. This tag is for questions regarding the numerous Salesforce plugins that exist for it such as VsForce, ForceCode and MavensMate.

0
votes
1answer
23 views

Unable to retrieve newly added metadata using Visual Studio Code

I have started using Visual Studio Code and I've run into an issue when trying to retrieve newly added metadata. I've created my project and connected to my development sandbox org and retrieved all ...
6
votes
2answers
960 views

Visual Studio Code download existing code

I have just installed and configured Visual Studio Code. I have authorized my staging organization which contains a grip of apex classes and custom objects. How can I download the existing code into ...
2
votes
1answer
88 views

No code coverage information was found for test run 7070U00000r8Ny3. Set “salesforcedx-vscode-core.retrieve-test-code-coverage”: true

In user setting.JSON I am using { "salesforcedx-vscode-apex.java.home":"C:\\Program Files\\Java\\jdk1.8.0_131", "salesforcedx-vscode-core.show-cli-success-msg": true, "salesforcedx-...
1
vote
1answer
369 views

Getting an Error on visual studio code

I am getting the below error on visual studio code The salesforcedx-vscode-apex.java.home setting defined in VS Code settings points to a missing folder. For information on how to setup the ...
0
votes
0answers
143 views

DeployFailed: Deploy failed. Visual studio code - Deploy to source code failed - SFDX Lightning Component Trailblazer

I tried to do the trailhead module "Create a Hello World Lightning Web Component" and I followed all the steps but when I do deploy to source to org, it fails. The error which I get is: "DeployFailed: ...
1
vote
1answer
213 views

VisualStudio Code not getting option “Deploy Source to Org”

I am starting to learn LWC and trying to create the HelloWorld example as described in in trailhead. I have followed all the steps mentioned in the trailhead but I don't get the option SFDX:Deploy ...
0
votes
1answer
131 views

Visual Studio and Salesforce CLI : Not able to authorize org

I just recently to download Salesforce CLI + Visual Studio with Salesforce Extension Pack. I tried to retrieve code from Salesforce instance not from Scratch org. Just for your knowledge, I am not ...
0
votes
0answers
19 views

sfdx push is still trying to push a class that i deleted from my project?

I deleted a class from my project and when i do a push, it seems like the classes's meta file is still trying to be pushed, even though it's been deleted from my project? force-app\main\default\...
1
vote
1answer
258 views

Reason: invalid_grant - expired access/refresh token

I think my access token for my scratch org expired. I'm using sfdx in visual studio code. What's the easiest way to get/fresh my access token?
-1
votes
1answer
68 views

How to test APEX rest API in Visual Studio [closed]

Is it possible / How to test Apex REST method from Visual Studio Code? From workbench we can test from REST Explorer
0
votes
2answers
55 views

Multiple Web Components for one Project, Visual Studio

When attempting to create multiple Web Components through VSCode, do you have to create multiple projects, or can you have one project with multiple components?
2
votes
3answers
857 views

Unable to Retrieve Source from Sandbox

From the VSCode console, I've created a new project with the command: sfdx force:project:create -n Integration --manifest I then authorize a sandbox org with the command: sfdx force:auth:web:login -r ...
1
vote
0answers
377 views

Salesforce DX - ENOENT error when trying to login

Recently I came upon an error which I cannot resolve. I have searched through google and did not manage to find the answer. I have installed salesforce CLI and when typing the command: in terminal:...
2
votes
1answer
715 views

SFDX: Tests do not run in Visual Studio Code

I am relatively new to SFDX and have the most recent updates for both VSCode and Salesforce CLI. I am unable to run any Apex tests on a sandbox using the UI in Visual Studio Code. When doing so I ...
0
votes
0answers
21 views

pushing code from one org to another using visual studio code [duplicate]

I know we can push code using ANT, I wanted to know if there is any other way to push code from one sandbox to another in Visual Studio code
0
votes
0answers
137 views

Can't Create Scratch Orgs

My vscode version is 1.30.1 and my sfdx version is sfdx-cli/6.44.0-dead729fb5 (darwin-x64) node-v8.9.4. I created 3-4 dev hug orgs and tried to create a scratch org from it but it is not working. I am ...
1
vote
1answer
955 views

Getting error while retrieving Source from Salesforce Org using VS Code and Salesforce Extension Pack

I am getting this error while trying to fetch(retrieve) source from VS Code and SF Extension Pack. STR : Right click on sfdx-project-json -> click on Retreiev Source from Org. The file is present ...
3
votes
2answers
1k views

Lightning Web Component — Lightning bundles must have a parent folder named ! 'lightningcomponents'

I am trying to create Lightning web component and keep getting this message, but could not figure out the issue. What does it say? Starting SFDX: Create Lightning Web Component 23:59:38.741 sfdx ...
0
votes
1answer
185 views

Cannot create scratch orgs in visual studio

I am trying to create a scratch orgs from visual studio, I authorise the dev hub successfully but when I try to create a scratch org it throw this error : ERROR: Error authenticating with the ...
1
vote
1answer
54 views

How to use VSCode to find which reports are using a specific field

I have used Eclipse in the past but unfortunately, Eclipse and Force.com IDE no longer work for me. I have switched over to VSCode along with the Salesforce DX and forcecode extensions (among many ...
3
votes
1answer
1k views

No sfdx-project.json found in the root directory of your open project. Open a Salesforce DX project in VS Code

I'm using VScode for Apex dev. I have logged into Devhub org. and created a scratch org. when I try to execute pallet command: SFDX: Refresh SObject Definitions I'm getting below error. No sfdx-...
1
vote
2answers
496 views

Use Visual Studio Code to work on Sandboxes and normal Developer Editions plus deploy on Production

I've used eclipse for a lot of purposes. At the beginning to write code and later mostly for deployments. Now I see, that Salesforce is focusing on Visual Studio Code for the future. I love and hate ...
2
votes
1answer
137 views

force:mdapi:convert duplicate files

I've been trying to commit to having version control in our org, and I have been using DX to do so. My biggest complaint right now is that I end up having a ton of .dup files. And I don't know of the ...
1
vote
1answer
143 views

SFDX “Develop Against Any Org” overwrites changes

"Develop Against Any Org in Visual Studio Code" As far as I understand, the feature of VSC SFDX extensions that allows to develop against regular sandboxes, allows only to retrieve and deploy, not ...
1
vote
1answer
210 views

View only DEBUG log entries in Visual Studio Code when using Salesforce DX

When using Visual Studio Code and Salesforce DX palette command: SFDX Get Apex debug logs... To get an Apex Log from the Salesforce servers, how can I then filter the output so I can only see the ...
4
votes
2answers
2k views

Apex PMD: Problem: Validate CRUD permission before SOQL/DML operation

Background I am using the Apex PMD plugin for VS Code and it's giving me this problem: Validate CRUD permission before SOQL/DML operation For this line of code: insert contentVersion; Which is ...
1
vote
1answer
73 views

WSDL2Apex for Visual Studio Code & Salesforce DX

Is there a WSDL2Apex extension for Visual Studio Code, which would allow us to use a WSDL Url or file to generate Apex classes in our Visual Studio Code Salesforce DX project?
6
votes
1answer
2k views

How do I get Apex code coverage statistics when using Salesforce DX & Visual Studio Code

I am using Salesforce DX & Visual Studio Code to develop against a sandbox environment. After running an Apex test from Visual Studio Code, how can I view the code coverage from within Visual ...
2
votes
1answer
1k views

SFDX: Deploy Source to Org: Very slow

I am using command: SFDX: Deploy Source to Org To deploy Apex code to a sandbox environment. But often it is taking a very long time (multiple minutes) to respond/complete. QUESTION How can I get ...
5
votes
1answer
729 views

SFDX: Deploy Source to Org: Errors do not appear as Problems in Visual Studio Code

How do I get the errors returned from command: SFDX: Deploy Source to Org To appear in the Visual Studio Code Problem Window? As this would allow us to click on the error and be taken directly to ...
2
votes
1answer
171 views

How to create Salesforce DX project sub-modules using Visual Studio Code / Salesforce DX CLI

I would like to break my project into multiple submodules: project - config - module-1 -- main --- default ---- classes - module-2 -- main --- default ---- classes - etc Is there a Visual Studio ...
15
votes
1answer
820 views

SFDX: ERROR: INVALID_OPERATION: rollbackOnError option must be true on a production org. When using Salesforce DX pre-release and Visual Studio Code

I have a Visual Studio Code project which has beed authorised against a production environment. I am using the Salesforce DX CLI pre-release: sfdx plugins:install salesforcedx@pre-release When I ...
8
votes
2answers
2k views

How to run Apex anonymous code from Visual Studio Code

Is it possible / How would I run a block of Apex anonymous code from Visual Studio Code?
-1
votes
1answer
334 views

Apex Language Server Extension not getting activated in Visual studio code - ForceCode: Force Menu

I have made changes to the JSON setting like "salesforcedx-vscode-apex.java.home":"/Program Files/Java/jdk1.8.0_131" but still Force Menu is not getting displayed in the Visual studio code menu. ...
1
vote
0answers
1k views

SFDX force:auth:web:login not working in Visual Studio Code

I am able to open via bash and powershell, but when I use Visual Studio Code's built in terminal it does not work. Anyone else having this problem?
14
votes
4answers
5k views

Format APEX code Visual Studio code

Has anyone been able to find a formatting extension for Apex on visual studio code? And if so would they be able to share it?
1
vote
1answer
974 views

How to Preview a Lightning App in Visual Studio code?

Hi so i'm new to salesforce developement and recently i switched from the developer console to the Visual studio code to develop components there , but the thing is i don't know how to actually ...
4
votes
0answers
194 views

Run Test button/link gives error: command 'sfdx.force.apex.test.class.run.delegate' not found

In Visual Studio Code setup with SFDX links appear above each test method/class that are clickable and presumably would run the appropriate test. However these have never worked for me, I just get ...
1
vote
4answers
1k views

Visual Studio Code - Retrieve Org

I'm a new at a company that does not have their org backed up. I'm trying to get it into github. I'm working with VSC and I added the ForceCode extension but it fails to pull standard objects. Could ...
23
votes
3answers
10k views

Can Visual Studio Code be used as an editor for Salesforce without SalesforceDX?

All the tutorials I have seen referencing the use of Visual Studio Code for Salesforce development imply that it is used in conjunction with SalesforceDX. It is my understanding DX is a relatively ...
11
votes
2answers
4k views

How to enable compile on save on Visual Studio with sfdx-vscode plugin?

How to enable or configure "Salesforce Extensions for VS Code" plugin on Visual studio code IDE to compile my Apex,Visualforce on the scratch org when I save the file locally. I have just started ...
17
votes
3answers
3k views

How can I replace Mavensmate and Sublime Text with something supported?

I was a big fan of Mavensmate and while it is still working I don't like to work with software which is not supported. I find the Salesforce development eco system quite confusing. There seems to be ...
3
votes
3answers
3k views

How do I open a project in Mavensmate using Visual Studio Code?

I'm having trouble getting VS Code to recognize any MavensMate tasks in my initial testings. I definitely have the MM desktop app installed and a working project for it (I've been using MM and ...