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.

42 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
309 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 ...
Aequitas's user avatar
  • 358
3 votes
0 answers
451 views

How to handle expired access/refresh token from visual studio

Currently, I'm facing an issue while retrieving package.xml after refreshed the sandbox. Error authenticating with the refresh token due to: expired access/refresh token Note: I have reauthorized the ...
Pavan tej's user avatar
  • 1,439
3 votes
0 answers
480 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 ...
Bigears's user avatar
  • 1,091
2 votes
2 answers
4k views

Go to definition not always working in VS Code

When I'm developing Java code, I frequently Cmd-Click on Mac or Ctrl-Click on Windows to go to the definition of a method, class, constructor, etc. however when I'm developing Salesforce APEX code it ...
mjaggard's user avatar
  • 143
2 votes
0 answers
2k views

How long can sfdx refresh sobject definitions run?

I have a dev sandbox against which I am pulling a SFDX: Refresh SObject Definitions. It has been almost 24 hours since I have initiated this and it is still running. The sandbox has a lot of objects ...
Apex Srinivas's user avatar
2 votes
0 answers
37 views

VSC Apex Replay Debugger - Run through multiple classes?

Having an issue where the Apex Replay debugger doesn't go through all the code in a debug log and once it steps into a class referenced from another class it exits out once it gets to the end of the ...
Bobbygllh's user avatar
  • 721
2 votes
1 answer
486 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 ...
Chance's user avatar
  • 1,050
2 votes
4 answers
8k 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 ...
C006's user avatar
  • 31
1 vote
1 answer
34 views

compactLayout removed from .object-meta.xml after "sf project retrieve start" or right click "SFDX: Retrieve source from org" 2GP

I'm building a package to eventually put on the app exchange. I've set up a dev hub, created a developer site with a namespace and configured visual studio code. I created my components in visual ...
Andy's user avatar
  • 23
1 vote
1 answer
393 views

Setting up debugger with Apex Salesforce in Visual Studio Error "Either your org or user doesn't have the permission to debug Apex"

I am trying to set up breakpoint and debug my code in Apex, but for some reason I get the following error when running the debugger: My lunch.json is as following: I am using Scratch ORG and my user ...
Lyubomir Tsvetkov's user avatar
1 vote
0 answers
2k views

VS Code and SFDX (salesforce) error: self signed certificate in certificate chain

I'm using Windows 10 + VS Code + Salesforce. From some point when I need to connect to Salesforce org. (make a push or just open it) I get the error "Error: self signed certificate in certificate ...
Pavel Kravets's user avatar
1 vote
0 answers
635 views

VisualStudioCode. SFDX: Authorize an Org. error

In Visual Studio Code. SFDX: Authorize an Org. This error displayed. "ERROR: We can’t query your org. Make sure that you’re connected to this org and have permissions to view the object and ...
ymd's user avatar
  • 11
1 vote
0 answers
1k views

How to retrieve Salesforce reports (in a subfolder) using VS Code

How can we retrieve SF reports in visual studio code, I have tried below options: 1). Using manifest.xml -> Nothing happened, no reports extracted and no error shown either. 2). Using sfdx force:...
sunil gupta's user avatar
1 vote
1 answer
2k views

Visual Studio Code Not Retrieving Full LWC Package

tl;dr - how to make sure Retrieve Source from Org includes XML file Description Normally when I retrieve source data for an LWC from an org in vs code the resulting file looks like this: For some ...
Jwok's user avatar
  • 767
1 vote
0 answers
3k 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:...
user64574's user avatar
0 votes
0 answers
14 views

Error: Invalid Alias or Id for SFDX Package Install

Getting error when using package alias name sf package install [email protected] vs 04t Id. Using the Id works fine. My packages are namespaced. Error (1): Invalid alias or ID: provutil@1....
ddeve's user avatar
  • 1,546
0 votes
0 answers
90 views

Unable to Deploy or Retrieve source from any ORG

I'm facing an issue while trying to retrieve source code from a package.xml file within our organization. This problem has persisted since last year, despite my attempts to resolve it by both ...
GraNeMM's user avatar
  • 11
0 votes
0 answers
126 views

VS Code sfdx-scanner installation error related to SSL

I am trying to install Salesforce sfdx-scanner for VS code on my office laptop as per the below guideline Install and Update Salesforce Code Analyzer. I checked some of the issues related to sfdx-...
Rachit's user avatar
  • 177
0 votes
0 answers
112 views

VSCode Quickfix / Code Actions for Apex files not working

TL;DR How can I enable (or customize) quick fixes/code actions for Apex classes in VS code? Problem Quick fix actions like extraction via ctrl + . or F2 for file-wide renaming aren't working. Below is ...
Jwok's user avatar
  • 767
0 votes
1 answer
188 views

ForceCode takes very long to load

I have VS code v1.77.2 and ForceCode v4.0.5 installed on a Windows machine. ForceCode takes more than 15 mins to load. It was suggested to re-install it, but that did not work. Any insight of why ...
Isabel Martinez's user avatar
0 votes
0 answers
110 views

Unable to retrieve source from Org - No error message

I have previously been able to retrieve source from org, however now when I click on Apex Classes in the org browser window it just keeps spinning. This happens both in my test org and my trailhead ...
Jonathan Crow's user avatar
0 votes
0 answers
87 views

Error deploying or retrieving source

I am facing this issue: "Error deploying or retrieving source: The file or directory that you tried to deploy or retrieve isn't in a package directory that's specified in your sfdx-project.json ...
GraNeMM's user avatar
  • 11
0 votes
0 answers
390 views

`sfdx force:apex:log:tail` to only show [USER_DEBUG] logs not working

I'm connected to a Playground org in VS Code. I have made and deployed a class to this org and would like to run some anonymous code in VS Code to test a method of the class. I was able to do this by ...
user135792's user avatar
0 votes
0 answers
758 views

How could i retrieve all email templates to VSC using sfdx or manifest?

I need to retrieve all email templates to my visual studio code to apply a general replacement on the text of those templates. I give a try to the solutions provided at those links retrieve all email ...
HAK's user avatar
  • 1
0 votes
0 answers
99 views

Using Salesforce Extension Pack in Visual studio professional

We purchased Visual studio Professional edition recently, for another project. Before this we have been using visual studio code and the Salesforce Extension Pack to code in Salesforce. Now we want to ...
Theqcue's user avatar
0 votes
0 answers
928 views

Unable to retreive org to VSCode

I am having problem with retrieving org to my VS Code. I usually work with IntelliJ, but I need to do some quick testing on my other laptop, so I tried using VS Code. Here are steps that I did so far: ...
Skylore's user avatar
0 votes
1 answer
129 views

Error retrieve from manifest in Visual Studio

I am trying to Retrieve Source from Org and I get this error: UNSUPPORTED_API_VERSION: Invalid Api version specified on URL In package.xml, it shows me: <version>54.0</version> With this ...
Willy Kelly's user avatar
0 votes
0 answers
500 views

invalid element error for <runtimeNamespace>

I am getting an error in xml file while building LWC (want to use with vlocity component) in VS Code. Please help me to resolve this error. Here is the xml: <?xml version="1.0" encoding=&...
SPH's user avatar
  • 1
0 votes
1 answer
92 views

Cannot connect Salesforce Visual Studio Editor

I'm trying to connect one of my Sandboxes to VS however I keep getting the type error found below. TypeError: Cannot destructure property 'underline' of 'chalk_1.default' as it is undefined. at ...
Noah Brammer's user avatar
0 votes
1 answer
472 views

How to over come the error :- The `innerHTML` property is available only on elements that use the `lwc:dom="manual"` directive?

On click of a div i am trying clear the content and I am making it editable. so when i try to get the innerHTML it has no issues but when i try to modify the innerHTML , i get a console error as below ...
JalilIrfan's user avatar
0 votes
1 answer
1k views

Lightning Web Component not getting deployed

I have been trying to deploy a lightning web component and an apex class to a developer org, but I receive the error "SFDX: Deploy Source to Org failed to run" in VS Code. Did I miss ...
Night Guy's user avatar
  • 214
0 votes
1 answer
652 views

How retrieve Default Org Values from Custom Settings to Visual Studio?

We want to change our 'Default Org Values' in our repo, but we don't find the option in Visual Studio. We are using Visual to upload the code to AWS and need to change this. We tried to include the ...
dibanepa's user avatar
0 votes
0 answers
341 views

Visual Studio Code, SFDXError with retrieve for Aura and LWC

since yesterday I started having an issue when I try to use the command SFDX:retrieve source from Org on Aura or LWC items. The command fails and I receive this error message: Also, I noticed that If ...
MarcoU's user avatar
  • 1
0 votes
1 answer
713 views

ApexPages.currentPage().getParameters() Method does not exist or incorrect signature

I use VS Code with Salesforce Extension Pack. I have this line in my class code: string cId = ApexPages.currentPage().getParameters().get('cId'); It gets a squiggle line under getParameters() and a ...
shlasasha's user avatar
  • 113
0 votes
1 answer
831 views

N/A An object 'casePortfolioManagement' of type LightningComponentBundle was named in package.xml, but was not found in zipped directory

When I deploy 'casePortfolioManagement' LWC code to Sandbox using Visual Studio Tool then I started getting below error: N/A An object 'casePortfolioManagement' of type LightningComponentBundle was ...
Mahesh Raghuraman's user avatar
0 votes
1 answer
1k views

sfdx Commands Suddenly Stopped Working in Visual Studio Code

I've been able to implement a current Salesforce project using Visual Studio Code as practice for implementing Salesforce DX. But suddenly, all sfdx commands (sfdx:authorize an org, sfdx: create a ...
Ertyq's user avatar
  • 331
0 votes
0 answers
1k views

VSCode: Does anyone else have an issue with the Source Control tab not showing changes made to Apex classes / triggers?

I'm new to Visual Studio Code, and have followed directions I found on the web for setting up a project with manifest, and then authorizing a sandbox, as well as connecting to a GitHub remote repo. ...
Joshua__c's user avatar
0 votes
0 answers
801 views

Force code extention not opening salesforce login page

I downloaded force code extension for visual studio code. When I'm trying to connect to specific org he doesn't open salesforce login screen in order to log in to the org. Is there any permission ...
Help's user avatar
  • 1
0 votes
0 answers
1k 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 ...
Tariq's user avatar
  • 1
0 votes
1 answer
1k 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 ...
Tariq's user avatar
  • 1
-1 votes
3 answers
2k views

Not able to create Salesforce Project in VS Code

I have installed Salesforce CLI and Visual Studio code but when i tried to create a Salesforce project with Manifest I get this error: (17:02:00.225 sfdx force:project:create --projectname ...
Prabhat Jha's user avatar
-2 votes
1 answer
1k views

'The org cannot be found' error in VS Code

Anyone experienced "The org cannot be found" issue in VS Code. I'm facing this issue from past 2 weeks. Tried with multiple orgs. Un-installed and re-installed VS Code. Tried with different ...
Chinni Vishnu Kalyan's user avatar