Questions tagged [vs-code]

Visual Studio Code is a free source code editor developed by Microsoft for Windows, Linux and macOS. When the "Salesforce Extensions for VS Code" are added it: supports syntax highlighting and intelligent code completion for Apex, Visualforce and Lightning Components; works well with SFDX including with scratch orgs; supports debugging. Git UI is built in. Many other extensions are available.

Filter by
Sorted by
Tagged with
0
votes
1answer
15 views

Apex Code - Region for as C#

I just want to know, if there is any practice like C# #Region in Apex code? I would like to be able to reduce some parts of my code in Visual Studio Code. Is there any way to do it? For anyone who ...
0
votes
1answer
12 views

Creating A Default Scratch Org in Visual Studio Code for Salesforce.. Getting Error with Exit Code 1

I am new to Salesforce Development. I just installed Visual Studio Code. I did successfully auhorize my Dev Org. But I am having issues when creating a Default Scratch Org. THe following the error ...
3
votes
4answers
5k views

Salesforce CLI is not installed - it ain't so

In VS Code. Go to command palette and enter 'Create Project with Manifest'. Prompted for a folder and get these messages: Starting SFDX: Create Project sfdx force:project:create --projectname ...
0
votes
0answers
11 views

how can I see the (Deployed)package thrown trigger

Firstly I was write Trigger for my one a object its working And after i wanted to write for production but i learn its imposible i need the deploy Thats why I install ForceCode in Visual Studio Code ...
1
vote
1answer
30 views

How to retrieve new meta from the org

I have new classes, pages, etc in the my Salesforce org. Is it possible to update the project with all new files?
0
votes
2answers
23 views

VSCode Lists Erroneous Apex Problems

I'm using VSCode with Github and Deploying to a Sandbox. When I save my classes, VSCode lists problems which don't exist and which don't clear when the class is deployed successfully. For example, all ...
8
votes
1answer
99 views

Visual Studio Code Apex class code coverage colors

I'm looking at the code coverage results from a recent run of all the tests in an org, and I'm not sure what all the colors represent. The green and red seem fairly self explanatory: Green - covered ...
3
votes
1answer
18 views

Automatically close Output window in vsc running salesforce CLI

I have switched from Sublime to VSCode. I have found ways to make most of VSCode work the way I want. The main thing I wish I could do is when I deploy to the org if it is successful I would like ...
4
votes
2answers
364 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
0answers
18 views

How do I get VSCode working with the Remote Development Extension Pack (WSL) and Salesforce Extension Pack?

I installed the Windows Subsystem for Linux on my Windows 10 machine. I am trying to do all my salesforce development in WSL so I can rely on the Linux CLI in my integrated terminal in VSCode. To do ...
6
votes
1answer
31 views

How to customize the default template for new SFDX Project in VS Code?

More specifically, I want every new SFDX project to include a ".scripts/" directory, populated with pre-written scripts (for deployments, data transformation, whatever). Another use-case could be pre-...
2
votes
3answers
204 views

Is There a Tool to Select Files to Download From an Org in VSCode?

Is there a way/extension in VSCode for selecting files to pull down from an org that doesn't require hand-editing the package.xml manifest file as one would in Workbench? This is one of the features ...
0
votes
0answers
34 views

VSCode overwrites changes without any warning

I am new to VSCode. I used the following to get all classes updated as per Org: sfdx force:source:retrieve -x src/package.xml After that I made some changes in a class in the deveoper console and ...
0
votes
1answer
86 views

VS code adds quotes in LWC

This is infuriating. I copy and paste this html from the trailhead module: <template> <lightning-card title="HelloWorld" icon-name="custom:custom15"> <div class="slds-m-...
0
votes
1answer
75 views

ERROR running force:auth:web:login: unable to get local issuer certificate - When Authorizing an Org in VS code

I have installed VS code and Salesforce CLI in my system.Now when I try to Authorize an Org using SFDC:Authorize an Org, It take me to the login page and also logs in and redirects to localhost:1717. ...
0
votes
1answer
21 views

Can I put actions tab on custom new object page?

I've created a Lightning Component to use for the 'new' action of my custom object. However, I've been asked to put the actions tab, particularly the 'new task' action on the page. I created the ...
1
vote
2answers
488 views

Deploy metadata to different org using VS Code

When I used Illuminated Cloud (IC), I could deploy the metadata in the workspace to another org by selecting the Deploy All Metadata option from the context menu and select a different org to deploy ...
0
votes
2answers
35 views

Is it possible to deploy modified changes via VSCode to the sandbox like in scratch org?

In VSCode I can only deploy changes from my project to the scratch org. Is it possible to do the same when VSCode is connected to the standard sandbox?
2
votes
1answer
37 views

Navigate to method definition in VSCode

I am new to VSCode. There is an Apex class like this: class MyClass1{ public static void someMethod(){ MyClass2.someMethod2(); } } Other class: MyClass2{ public static ...
1
vote
1answer
33 views

How to turn off the auto pop-up of Salesforce-CLI window everytime I save (deploy source to Org) in VSCode DX

I'm using VSCode for my salesforce development and I installed the Salesforce CLI integration plugin and Salesforce extension pack. Every time I save a source code which gets deployed to Org ...
0
votes
1answer
28 views

VS Code lightning Explorer not rendering anymore

This used to work for me. I tried re-installing the extension pack and nothing. Maybe somebody else is having the same issue.
0
votes
1answer
34 views

Running unit test class from VSCode

I am new to VSCode. The Org is setup in VSCode. ForceCode, vforce, Salesforce CLI Integration and some other extensions installed in the VSCode. Org is authorized. I am able to save my changes in ...
0
votes
0answers
12 views

Visual Studio Code unable to retrieve salesforce installed package smaple gallery project 'Recipe'

Installed salesforce sample gallery project 'Recipe' in my development org directly from GitHub using the 2nd option "Installing Recipes using an Unlocked Package". I created the project in VS using "...
0
votes
1answer
30 views

LWC without APEX: sfdx force:source:deploy into Production

I have a simple LWC component that is only made up of html, javascript, and css (no APEX). When deploying to production via vscode, I am confused on what I am suppose to be testing as I receive the "...
0
votes
1answer
32 views

Getting classes, triggers and VF pages from Org in the VSCode

I am new to VSCode. I have set up VSCode and connected it an Org. But not able to see the classes from the Org in the VSCode. I need to use classes, triggers and VF pages from the Org, in VSCode? ...
0
votes
1answer
18 views

This site cannot be reached error while authorizing Org in VSCode

I was trying to authorize the Org in the VSCode. It is taking me to a page on localhost on port 1717. I am getting an error like below: When I checked the URL. It was like this: How to get over ...
3
votes
1answer
59 views

can't create scratch org (fatal ended with exit code 0 no error description)

I gather that this question has been asked before but so far I haven't found anyone with the same error (or lack thereof) since the VS code status says SFDX: Create a Default Scratch Org... ...
0
votes
1answer
637 views

Installing SFDX

I am trying to install sfdx on my windows 64 to create lwc, I have VS code with salesforce extension and lwc extension. I downloaded sfdx cli from here. https://developer.salesforce.com/tools/sfdxcli ...
2
votes
4answers
1k views

Cannot connect a Salesforce org using Authorize an org in VS Code

Using VS Code, after I enter the command line "Authorize an org" I get redirected to Salesforce login and can successfully log in. However I then get the error "This site can't be reached" The URL ...
0
votes
1answer
22 views

How to create a lightning app in Visual Studio Code?

I'm pretty new to Salesforce development and I'm trying to wrap my head around Lightning App development. Essentially I'm looking to setup a base application which will have a tab(ex:Admin) So far I ...
1
vote
1answer
155 views

SFDX: retrieve Source from Org failing

In order to connect my VSC to my org and pull my org's datas to VSC, I followed the steps this great video shows ; In Visual Studio Code I : - SFDX: created project with Manifest - in the manifest -> ...
4
votes
4answers
2k views

Deploy lightning web component is getting failed with error - “--json --loglevel fatal ended with exit code 1”

I am trying to deploy a lightning web component to the org using vs-code but getting the error. Starting SFDX: Deploy Source to Org 10:09:14.43 sfdx force:source:deploy --sourcepath d:\Aakriti\...
3
votes
2answers
82 views

SFDX Question. Can source:status be used in sandboxes?

Quick question, can I use source:status on sandbox? I'm a sf developer and I am still learning how to use sfdx in org development model (since its the one we use) and was wondering if source:status ...
2
votes
1answer
33 views

How to create Custom SOObjects using Visual Studio Code?

I'm a .Net developer. Just started learning Salesforce. I would like to setup a dev environment using Visual Studio Code. I'm able to do that with the help of Salesforce Extension Pack. However I'm ...
11
votes
3answers
5k views

How to push code to production with Visual Studio Code & DX

I am using Visual Studio Code to develop new functionality. However, after completing the testing in the sandbox, I want to push the code to production. When I choose "SFDX: Deploy Code to org", it ...
1
vote
1answer
39 views

How do I retrieve a flow and associated metadata from an org?

I usually use SFDX to retrieve all of the metadata from my sandbox. I usually work on this in VSCode. Right now I'm trying to use SFDX in VSCode to retrieve a flow so I can test that flow in another ...
5
votes
2answers
4k views

No Option for “SFDX:Authorize an Org” command in VS Code Command Palette

I have performed below steps- Install CLI Install extensions "Salesforce Extension Pack" and "Saleforce CLI Itegration" I am getting only few SFDX command options in Command Palette. Also i have ...
0
votes
0answers
80 views

VS code : Authorize Org failed

I am new to lightning web component. I have installed VS Code, salesforce extension pack inside VS code, Salesforce CLI and set environment variable C:\Program Files\Salesforce CLI in my system. When ...
0
votes
1answer
35 views

Unable to authorize sandbox using vs code in salesforce

Try this: Kill the process running on port 1717 or use a custom connected app and update OauthLocalPort in the sfdx-project.json file. 20:57:24.539 sfdx force:auth:web:login --setalias vscodeOrg --...
1
vote
1answer
72 views

ERROR running force:source:delete - The delete operation failed in the org. Review the error messages below

I am trying to delete an Aura Component by right clicking on the file contents and selecting: SFDX: Delete This from Project and Org But it's not working... I get this message in the output panel:...
0
votes
0answers
36 views

Error trying to authorize dev org for trailheads and vscode

Not sure what's going on here but I'm following the following trailhead and trying to authorize my dev org for use with vs code: https://trailhead.salesforce.com/en/content/learn/projects/quick-start-...
4
votes
1answer
182 views

VS Code Salesforce plugin deploy does not provide an error message

VS Code plugin for salesforce seems to be broken yesterday, It does not provide proper error message in case of failure. Tried this in a developer org as well as scratch org. Neither deploy code or ...
0
votes
0answers
21 views

VS Code Deployment not showing detailed error [duplicate]

I'm using visual studio code to develop an aura component. Usually when i deploy a source to my org the error i was receiving was the same i can find in the "Deployment Status" Section on salesforce, ...
1
vote
0answers
40 views

VSCode for Salesforce

I am trying to connect VSCode with my SF org(a trailhead org) and I get to the SF login page and then when I try to login, I get the following error: I am not sure why this is happening but I believe ...
0
votes
1answer
536 views

Salesforce Extension Pack Not Working in VS Code

I have a co-worker that installed the Salesforce Extension Pack for VS Code. There is no go to definition for apex code and it is not possible to run tests. We have tried uninstalling all extensions ...
2
votes
1answer
1k views

Java runtime could not be located” when starting VSCode with the Salesforce Extensions - Java Installed

I have followed the steps suggested on "Java runtime could not be located" when starting VSCode with the Salesforce Extensions. But now I still getting the following error " Code Editor ...
2
votes
1answer
35 views

How to run the command “sfdx force:apex:test:run” so that System.debug statements are printed in the console?

I love the option of running test methods from VSCode by clicking on Run Test link that appears below the @isTest annotation. This works well but when a test method fails, I go ahead and add a System....
0
votes
1answer
127 views

How to take complete backup of salesforce org using VS Code

I am using VS code And installed below two packages Salesforce CLI Integration (https://developer.salesforce.com/tools/sfdxcli) Salesforce extension And Want to take complete backup of org, when I ...
2
votes
0answers
83 views

How to setup ESLint in VSCode to work with every project?

Below is the process I am doing in VSCode to setup for every project I create: run command npm init from project folder and this is creating package.json file. Run the command eslint --init and it ...
0
votes
1answer
45 views

How to get non-SFDX folder structure in VS Code in Dev Hub enabled Org?

We have enabled Dev Hub in our org but we are not using Salesforce DX. Since Dev Hub is enabled, when we create projects, we get SFDX folder structure. But when we do code merge, our code repository ...