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
0 answers
22 views

VSCode .gitgnore not ignoring .sfdx folder

As in the title, I've encountered a problem with the .sfdx/ folder in my repo. After cloning the project it sees some local changes in the typings/lwc and typings/tools folder. .sfdx/ folder is ofc in ...
user avatar
-1 votes
3 answers
29 views

How to retrieve the one particular lwc component (only one) from org to vs code?

We all know that it is possible to retrieve all the lwc components from org to vs code using the manifest file but I need to just get only one lwc component from org. Is there any way to do so please ...
user avatar
0 votes
0 answers
28 views

Not able to retrieve source from org using vs code

I am trying to retrieve all the metadata from my developer org through vs code but I am facing this issue : sfdx-project.json file. Add this location to your "packageDirectories" value, or ...
user avatar
  • 53
0 votes
0 answers
22 views

Prettier not working in VS code

I am not able to configure "Prettier" into my VS Code. I followed the following steps: Installed Prettier and selected Prettier as the 'Default Formatter' for both User and Workspace. ...
user avatar
0 votes
0 answers
20 views

VSCode - Missing Plug Icon from CLI Extension

A coworker of mine is missing his plug icon that's made available through the Salesforce CLI Integration (installed via salesforce extension pack). After going through the status bar options, trying a ...
user avatar
-1 votes
0 answers
24 views

Address settings not getting updated

I have made changes to the label field inside the address.setting xml through VS Studio code and right-clicked on the file then deployed the changes, but it's not getting updated in Sandbox even ...
user avatar
  • 61
1 vote
0 answers
23 views

In Mac, force:org:open: policy denied

I jus upgraded my Mac and now I cant connect to the org via vscode due to the error. I set node_tls_reject_unauthorized =0 sfdx_disable_dns_check=true but no luck. Error running force:org:open: policy ...
user avatar
1 vote
0 answers
16 views

Strange Behaviour: Knowledge__kav gets renamed to Knowledge__c

import KNOWLEDGE_ARTICLE_NAME from '@salesforce/schema/Knowledge__kav.Title'; I have this simple piece of LWC code which when pushed to the org strangely resets Knowledge__kav to Knowledge__c EVERY ...
user avatar
0 votes
1 answer
34 views

Creating Scratch Org results in error

Created a scratch org in VSCode. Trying to push source to default scratch org results in the following errors: The global picklist cannot be resolved Global value set cannot be resolved In field: ...
user avatar
  • 15
1 vote
0 answers
52 views

Problem's are returning errors linking to incorrect file locations giving "The editor could not be opened because the file was not found"

I recently did a new install of VSCode and SFDX CLI on a new Macbook. So versions are recent. I have updated SFDX since this error but it still exists. sfdx-cli/7.152.0 darwin-x64 node-v16.15.0 What ...
user avatar
0 votes
0 answers
44 views

Is there a VS Code setting to prevent the SFDX Problem Matcher from returning absolute path?

When I have a compile problem, the problem matcher does not open the source code file in my project. Instead, it tries to find the file in an absolute path at the root of my C drive (windows 11) and ...
user avatar
1 vote
0 answers
61 views

Invalid Session ID found in SessionHeader: Illegal Session in VS Code

I am facing this error in Visual Studio Code after authorizing an org with session id: INVALID_SESSION_ID: Invalid Session ID found in SessionHeader: Illegal Session. Session not found, missing ...
user avatar
0 votes
1 answer
62 views

VSCode Outline not loading for apex file

I use VSCode for Salesforce development and the outline section just keeps loading but never loads. It works well for JS files but doesn't show at all for apex files. And due to the same reason, I am ...
user avatar
0 votes
1 answer
51 views

Is anybody using Metarocket.io as a SFDC GUI?

Was trying to find a way to Find & Replace Visualforce page names in an org and this community answer lead me to MavensMate which is not supported anymore. Then this question looking for an ...
user avatar
-1 votes
1 answer
41 views

Visual Studio Code choosing a default Org

How do I choose a default org to connect to? I see a few but no option to choose which one? Thank you
user avatar
0 votes
0 answers
33 views

How should I resolve this error which I am facing while pushing source to salesforce?

So, I been trying to push the source code to the default scratch org which i have created using VS Code but I keep getting this error. 00:14:34.116 sfdx force:source:push --json --loglevel fatal 00:...
user avatar
  • 1
0 votes
1 answer
140 views

How to exclude Test files From Searches in VS Code?

Is it possible to exclude test files when doing a grep search in VS Code? I would have thought one of these regexes would have worked ^/(?!Test$)[a-z0-9]+$ Or ^/(?!Test)([a-z0-9]+)$
user avatar
2 votes
2 answers
237 views

Changes are not visible after deployment of LWC

I'm new to LWC, I'm trying to deploy code after changes but changes are not visible in the LWC Component. I also clear the cache many times but didn't see any changes in the browser. I also Disabled ...
user avatar
  • 21
1 vote
1 answer
93 views

Salesforce DX nested LWC folder structure and different deployment methods result in different behaviour in sandbox [duplicate]

I have this nested lwc folder structure --force-app -- main -- default -- lwc -- parent -- lwc -- child When trying to deploy into my sandbox: in vscode if I ...
user avatar
1 vote
1 answer
99 views

VS Code no longer recognizing CLI Extensions

In the past week, VS Code no longer recognizes the CLI/SFDX. I have verified that I can create projects with sfdx force:project:create and the correct folder structure is created. However, when ...
user avatar
  • 77
3 votes
2 answers
279 views

How do I disable whatever Intelisense is showing me components when I start an open brace in JavaScript?

When I type @api showModal() { in VS Code, I get this from Intelisense: If I press the return key, as I normally will to create a new line, the first item gets selected instead of a carriage return. ...
user avatar
  • 663
0 votes
0 answers
44 views

Git Commit adds line breaks that wasn't commited

I've been working fine deploying profile permissions on git via VSC. Recently I started to have some issues where I check the changes stage those, check again and see like 10 lines modified. Then when ...
user avatar
0 votes
0 answers
40 views

Apex replay debugger cannot replay debug log from Browser application

I try using Apex Replay Debugger. I have successfully setup them all. With a log that's generated from Apex unit test, I can debug it in VS code. I can use breakpoints to pause the replaying. However, ...
user avatar
0 votes
0 answers
109 views

Org Browser only lists fields on Custom Object

The Org Browser on my system used to have the SFDX format for Custom Objects. It would list the fields, listview, compact layouts etc. in tree format so I was able to retrieve the exact component(s) I ...
user avatar
0 votes
1 answer
78 views

Resource Not Found Using sfdx force:org:create

I am attempting to use a sandbox of my production org as a DevHub for scratch orgs. In VSCode, I am using the built-in sfdx application to do this, first creating an sfdx project, then authorizing my ...
user avatar
2 votes
1 answer
132 views

Code Snippets for Aura components and LWC

I am trying to create some vs code snippets for aura and LWC so I created one snippet file for javascript now it works in both the languages but is there a way I can restrict JS and html snippets to ...
user avatar
  • 2,245
0 votes
1 answer
45 views

Visual Studio Error code for required field

I am new to VS code and I am trying to make a field required, I have basically made it required on the object and created the branch in Soruce Tree but I am getting this error when I try to push it. ...
user avatar
  • 13
1 vote
1 answer
76 views

VS Code: Commands run through Command Palette (CMD+Shift+P) won't show in Output

I could be mistaken here, but earlier when I used to use VS Code and the SFDX CLI plugins through the Command Palette (i.e. Command + Shift + P) to kick off a process (deploying code, retrieving code ...
user avatar
  • 13
4 votes
0 answers
141 views

How to integrate Apex PMD with husky and lint-staged?

I am currently working on the IDE setup for a SFDX project. In my opinion the process for ensuring good code quality already starts in the developer's IDE. Therefore, for UI components, I already have ...
user avatar
1 vote
1 answer
174 views

Visual Studio Code [Content] Command 'SFDX: Authorize an Org' resulted in an error (command 'sfdx.force.auth.web.login' not found) [OK]

my vs code was working fine including Authorise an Org. However, after I deleted authorised org details file in the .sfdx folder and deleted an alias in alias.json file. I started getting this error ...
user avatar
1 vote
0 answers
38 views

Apex Log manager needed, or way how to filter big amount of logs

I'm looking for some tool, or extension for managing/ searching Apex logs. My main problem is I can produce very easily, a lot of logs by myself and ofc I'm not alone. Basically, when I reload one ...
user avatar
1 vote
0 answers
50 views

Failure performing sObject describe connect ETIMEDOUT

I have started using VScode for my salesforce development , while i could setup my application in the IDE and retrieve all the necessary code. I find i'am unable to refresh standard object. but i can ...
user avatar
1 vote
1 answer
215 views

SFDX: Execute SOQL Query failed to run

Unable to run SOQL queries on VSCode. I'm getting the following error. Starting SFDX: Execute SOQL Query... 19:33:27.886 sfdx force:data:soql:query --query SELECT Id, Name FROM Account 19:33:27.888 ...
user avatar
0 votes
1 answer
299 views

Unable to Authorize an Org in VSCode

I'm unable to Authorize an Org from VSCode. I'm getting the following error. Starting SFDX: Authorize an Org 16:39:55.121 sfdx force:auth:web:login --setalias <org-name> --instanceurl https://...
user avatar
0 votes
1 answer
89 views

How can I connect vs code to my subdomain

I am new in learning lwr & lwc. I have installed VS Code, salesforce extension pack inside VS code, & Salesforce CLI . On salesforce side I created a new site/subdomain in my sandbox by >...
user avatar
  • 15
0 votes
1 answer
510 views

lightning web component specialist

Not able to complete the challenge. Can anyone help me Build the component boatSearch Challenge Not yet complete... here's what's wrong: We can't find the right settings for the lightning-button in ...
user avatar
  • 1
0 votes
0 answers
48 views

Connecting Salesforce Org to Visual Studio Code

I am new to Salesforce and I am currently learning Lightning Web Components. I connected my Org with Salesforce with no problem. But when I try to deploy a component to my Org the output console of VS ...
user avatar
0 votes
0 answers
40 views

error message SFDX: Create a Default Scratch Org... failed to run

I'm trying to create a scratch org but get the error message "SFDX: Create a Default Scratch Org... failed to run" I have connected my vscode to my org. what am i doing wrong? I also saw ...
user avatar
  • 1
0 votes
0 answers
63 views

VSCode, Change Namespace of Report TYpes and Reports

My company makes an AppExchange App and we are changing the namespace for some customers. In VS Code I have been successful with Flows, and Classes. I am now having trouble with Report Types. I am ...
user avatar
0 votes
0 answers
38 views

Retrieve source from org not grabbing files - VS Code

I have a Sandbox that I working with. I have created a new folder on the desktop 'Working_San', I create a project 'Standard Project Template', and then I authorize the org. I am able to sign in ...
user avatar
  • 39
1 vote
1 answer
155 views

Command 'SFDX: Run Apex Tests' resulted in an error (command 'sfdx.force.apex.test.run' not found)

I am learning Salesforce Apex development by taking a trailhead tutorial. Tutorial: Find and Fix Bugs with Apex Replay Debugger I followed the tutorial along and got the following error when I try to ...
user avatar
  • 153
1 vote
1 answer
74 views

Checked Out A Scratch Org In VS Code and Want to Go Back

I was connected to my production org with VS Code and checked out a scratch org through my VS Code. Now I want to go back to my production code but am not sure what commands to go back to the "...
user avatar
  • 3,179
0 votes
0 answers
66 views

Not able to authorize salesforce org in vs code

When i try to authorize my salesforce org with vs code i am getting the below error. "Error authenticating with auth code due to :getaddrinfo ENOTFOUND test.salesforce.com" All the ...
user avatar
0 votes
1 answer
401 views

Prettier Apex Plugin Won't Format Apex

UPDATE: I've been able to run prettier manually using npx prettier --config .prettierrc --write .\force-app\main\default\classes but I still cannot have it to work on save. Hello everyone, I'm ...
user avatar
1 vote
1 answer
248 views

What's wrong at setting Java Home in Visual Studio Code for enabling Apex Tests?

I wanna enable Apex Tests in my workspace in VS Code, but I am unable to find out what is wrong. Here are my possibilities: Here is the setting that I am putting... {"salesforcedx-vscode-apex....
user avatar
1 vote
1 answer
567 views

Error deploying field with VS Code "Method not implemented"

I am unable to deploy field changes to my dev org with VS Code, due to the following error when running SFDX: Deploy source to org: An error was encountered during conflict detection. ...
user avatar
15 votes
2 answers
689 views

Project structure and modular development best practices

I want to stop using the usual force-app/main/default single folder project structure in order to better organize my projects and decouple dependancies. While researching about this practice, I found ...
user avatar
0 votes
0 answers
149 views

Salesforce DX push failed to scratch org with error parsing package.xml-meta.xml file

After created a scratch org, I pushed my visualforce page and got error: Error force-app\package.xml-meta.xml Error parsing file: Element {http://soap.sforce.com/2006/04/metadata}types invalid at ...
user avatar
0 votes
1 answer
73 views

VS Code: deployed duplicate fields?

I needed to add 100 fields in a sandbox. I saw that VS Code showed the fields as xml under \force-app\main\default\objects\This_Object__c\fields\field1__c.field-meta.xml Thinking myself clever, I ...
user avatar
  • 642
3 votes
1 answer
59 views

How can I see all my active Orgs in the VS CLI and remove the expired ones?

So I want to remove the expired Scratch-Orgs and get a list of my valid Orgs including the scratch orgs?
user avatar

1
2 3 4 5
9