We’re rewarding the question askers & reputations are being recalculated! Read more.

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
2
votes
1answer
93 views

How to format Apex code more flexible than with Prettier

Note: This is a Salesforce-specific question so don't close it. Salesforce has contributed a Prettier plugin for Apex so in other forums people cannot help me. I'm new to Prettier and couldn't ...
0
votes
0answers
7 views

While deploying an Application I am getting this Error in VS Code

While deploying the Application. The page "Dataset Explorer" for Menu Item "Dataset Explorer" must be published, begin with a / character, and consists only of characters that are permitted in a URL ...
1
vote
2answers
54 views

Warning: force:lightning:lwc:start is not a sfdx command

I am trying to use the new LWC Local Development Server. I've run command: sfdx update So I know I am using the latest version of the CLI. And I've installed the plugin: sfdx plugins:install @...
0
votes
1answer
61 views

Error: Cannot find module '@salesforce/sfdx-lwc-jest/config' while testing my LWC from vs code

I have started my practice on LWC testing While i'm run this command:"npm run test:unit" i am getting this error:Cannot find module '@salesforce/sfdx-lwc-jest/config'. Error body is: Error: Cannot ...
4
votes
3answers
71 views

VS Code Deploying User Interface similar to MavensMate?

One of the things I loved about MavensMate was how easy it was to deploy Metadata from one SFDC Org to another. See image below - it allowed you to select which metadata types you wanted to deploy and ...
1
vote
0answers
19 views

VS Code - Compare metadata in different orgs

The one thing that Eclipse IDE seemed to do well that I've not yet worked out in VS Code is comparing metadata in different orgs. Using VS Code, I know how to compare files which are in the same ...
1
vote
1answer
26 views

How to retrieve lightning component quick action in VS code

How to retrieve lightning component quick action in VS code. When i retrieve the layout it is showing the quick action for visual force components only. Do any one know how to fix this. My package.xml ...
2
votes
0answers
33 views

Uncrustify with VS Code is overindenting SOQL Lines

I use VS Code and use Uncrustify to format the apex code As per this article. This was working fine for me until all of a sudden my SOQL lines are now automatically indented after the WHERE clause. ...
0
votes
0answers
24 views

Can't refresh sobject definitions from SFDX: Must pass a username and/or OAuth options when creating an AuthInfo instance

I'm having the same problem described here: sfdx sobject refresh That thread has this suggestion: Go to your personal setting and then to Authentication Settings for External Systems then clear ...
0
votes
0answers
16 views

VSCode not showing namespaces prefix on aura:attribute

When viewing code in VSCode, the namespace prefixes (AQB__) in the aura attributes are not showing. However, they do show in the Developer Console. This code was created using the Developer Console. ...
1
vote
1answer
28 views

Giving custom field edit access to System Administrator

I recently transferred a bunch of metadata from one Salesforce Organization Instance to another. To do this, I created a package that contained all the custom objects, web components, apex classes, ...
1
vote
1answer
15 views

Trouble Installing JDK on Mac for VSCode (SFDX)

I'm trying to do the Apex Replay Debugger trailhead, which requires JDK 8. When I install the JDK on my Mac, the installer tells me it went into /Library/Java/ directory. However, when I look in that ...
1
vote
0answers
17 views

SFDX: Get Apex Debug Logs for Site Guest User in VS Code

How do I get Debug Logs for Site Guest User in VS Code? I ran SFDX: Get Apex Debug Logs and I can see debug logs for my user. But what I want is debug logs for Site Guest User which I don't see in the ...
1
vote
1answer
84 views

Unable to install sfdx plugins:install @salesforce/lwc-dev-server

I am using 1.38.1 version of VSCode and i have done "http.proxyStrictSSL": false I am still getting error Error: unable to get local issuer certificate i tried in my personal laptop. Now ...
0
votes
1answer
37 views

Running into a “A name parameter is required to create storage” when creating Apex Class w/ VSCode

I'm attempting to create an Apex Class a part of the Convert Lightning Web Components Open Source to Salesforce trailhead module and when I try to create a class on my mac, I run into this error. ...
0
votes
1answer
51 views

Cannot connect to Salesforce Org from VS Code/Salesforce CLI: Must pass a username and/or OAuth options when creating an AuthInfo instance

I'm trying to connect to my Trailhead playground org with the Salesforce CLI on VS Code. Here's what I've done: I created the project then clicked on Authorizing a dev hub. I was prompted for a login ...
0
votes
2answers
38 views

Not able to Authorize an ORG in VS Code

I am trying to create project workspace using VS Code. I am using SFDX: Create Project with Manifest command. After executing, it is creating folder for my project with all default files in VS code. ...
0
votes
1answer
19 views

Retrieve Case Action - Send Email Metadata in VsCode

I have made changes to the pre-defined field values section of Case Action:Email in my scratch org. Upon pulling, VsCode retrieves nothing. Can someone help? How should I commit this change and under ...
1
vote
2answers
45 views

How to select “selected” project components (autogenerate custom package.xml) in VS Code?

When creating a project in Eclipse Force.com IDE, there was a step to tick project components in a checklist. That would generate package.xml accordingly. In fact, you could also later "Edit project ...
1
vote
1answer
57 views

Working with GIT and org code in VS code for a single sandbox

We have our existing code repository in GitHub. This code is in folder structure resembling eclipse IDE forlder structure(or probably they call it metadata structure), like src --> classes --> myclass....
0
votes
1answer
28 views

VS Code retrieve Profile data

I retrieved with VS code all my profile, with * Profile in package.xml. But in definition of a profile "profileName-meta.xml", i can't find userPermission with false value. ...
1
vote
1answer
31 views

Where to find connected VS Code apps in setup

I tried finding the connected VS Code apps in Connected Apps OAuth Usage and Manage Connected Apps but could not find it. I have below queries: Where to find which all VS Code apps (and which systems)...
3
votes
4answers
1k views

VS code: how to specify Aura bundle folder?

Can anyone explain this error, that I've got in VS Code recently? When I tried to deploy code to my Org, I got this: SfdxError: You must specify the Aura bundle folder, not an individual component. ...
2
votes
1answer
22 views

How do I display more characters when debugging SFDX code?

I have variable in my code defined as follows: String myString = myConfig.my_field_name__c; When debugging in the SFDX console (in VS Code), the variable's value is only displayed as: myString: '...
1
vote
0answers
112 views

SFDX Source Diff: Error: EISDIR: illegal operation on a directory, read

Background I want to use the Source Diff feature in VSCode. When I follow the instructions to install it, by running this command: sfdx plugins:install @salesforce/sfdx-diff I get this error: $ ...
0
votes
0answers
43 views

Lightning Component Indexing in VisualStudioCode hogs CPU and memory slowing my PC

I keep seeing "Indexing Lightning Components" in Visual Studio Code, which is a CPU and Memory hogging activity, slowing my PC. Is there a way to make it less CPU intensive?
0
votes
1answer
45 views

VS Code and custom Labels

I use VS Code with Salesforce extensions and connect to my sandbox as explained here: https://forcedotcom.github.io/salesforcedx-vscode/articles/user-guide/org-development-model With my package.xml ...
0
votes
1answer
73 views

Moving changes from one organization to another

I have been working under an organization's salesforce instance for a little under a year now and have created custom objects, API endpoints, LWCs, and more. There has now been a a structural change ...
2
votes
1answer
228 views

Visual Studio Code does not pull Standard Objects

I have run SFDX: Create Project with Manifest and then successfully ran SFDX: Authorize an Org to connect it with my sandbox. Here is a part of my package.xml <types> <members>*</...
1
vote
2answers
59 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
21 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 ...
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
41 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
116 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
191 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
27 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 ...
7
votes
1answer
53 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-...
1
vote
1answer
111 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 ...
2
votes
3answers
219 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
1answer
22 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 ...
0
votes
2answers
47 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?
0
votes
0answers
66 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 ...
3
votes
1answer
79 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
747 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
1answer
85 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
117 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
30 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 ...
0
votes
1answer
353 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. ...
3
votes
1answer
240 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
0answers
19 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 "...