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.

Filter by
Sorted by
Tagged with
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....
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 ...
4 votes
1 answer
11k views

VSCODE: Unable to Authorize to an ORG

I'm having the same problem. For me, I'm not getting redirected to my salesforce Org. This is what I see in VSCode 12:22:15.474 sfdx force:auth:web:login --setalias DevOrg --instanceurl https://login....
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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-...
7 votes
2 answers
21k 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-...
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 ...
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 ...
0 votes
1 answer
84 views

Connect VSCode to existing Scratch Org

I have two scratch orgs and one non scratch org. I restarted my Visual Studio Code and lost my connection to the scratch org. Can someone please tell me how to connect VS code to existing scratch orgs....
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 ...
0 votes
2 answers
87 views

Is there a way to commit custom object records via VS Code to a repo?

I could notice we can commit Custom object fields and layouts and such, but can we commit the custom object records which we created in org?
0 votes
1 answer
310 views

Cant retrieve EventRelayConfig metadata in VSCode

im playing around with the rather new event relay feature that integrates salesforce into AWS. The feature itself works fine but I stumbled upon the metadata page in the salesforce docs ( https://...
0 votes
0 answers
60 views

getting error as The "path" argument must be of type string, Received undefined [duplicate]

In Trailhead Challenges In Build a Bear-Tracking App with Lightning Web Components project, I have completed the challenge but it's not working for deploy source to org. I am getting an error as The &...
1 vote
2 answers
6k views

Not seeing SFDX Commands in VS Code

I cant see the SFDX Commands like deploy to server, retrieve from server. Authorization to the sandbox was successful yesterday. When I try to deploy my code from the same workspace in vs code today, ...
1 vote
1 answer
143 views

Why is chevron showing on child Data? Tree grid lwc salesforce

JS file import { LightningElement, wire , track} from "lwc"; import { NavigationMixin } from 'lightning/navigation'; import { refreshApex } from '@salesforce/apex'; // Import the schema ...
3 votes
4 answers
18k views

Issue while authorizing an org : Kill the process running on port 1717

Currently I am unable to authorize an org due to the below error. Kill the process running on port 1717 or use a custom connected app and update OauthLocalPort in the sfdx-project.json file. I have ...
5 votes
2 answers
10k views

VS Code: "Unexpected end of JSON input" error when changing the default org

When clicking the "Change Default Org" button in the VS Code status bar, rather than seeing a list of the orgs I was authorised against, I was seeing an error: Unexpected end of JSON input
3 votes
1 answer
20k views

SFDX: Authorize an Org failed to run in VSCODE

SFDX: Authorize an Org failed to run in VS Code: I am tring to authorize an org on visual studio code but when I am trying authorize it, I am getting the below error. SFDX: Authorize an Org failed to ...
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 ...
1 vote
4 answers
9k views

Trailhead Dreamhouse: ERROR running force:source:deploy: No source backed components present in the package

I'm new to Salesforce and am stuck on amending the price filter in the DreamHouse trailhead project. The label for the price filter needs to be updated and deployed, but when I try to deploy the ...
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 ...
-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 ...
1 vote
1 answer
41k views

Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable to '0'

I hope you have a nice day, for about a month now, every time I connect to an instance through Visual Studio, I get this message: Warning: Setting the NODE_TLS_REJECT_UNAUTHORIZED environment variable ...
0 votes
1 answer
731 views

Visual Studio Code - can we compare Metadata in two orgs

A client is moving away from change sets to Azure Devs Ops. However, for now deployments are done using change sets, The org size is small, and currently no custom code, only config - custom fields, ...
2 votes
3 answers
6k 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 ...
12 votes
7 answers
28k 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 vote
1 answer
433 views

Retrieve Enhanced Letterhead via Metadata API

Can someone please point me to a blog or walk me through steps for retrieving Lightning Enhanced Letterheads in VSC. I can see the classic letter head in VSC but not lightning Enhanced Letterhead, and ...
0 votes
1 answer
371 views

Retrieve ReportType in Visual Studio Code

I am able to retrieve Email Templates in VIsual Studio Code as follows sfdx force:source:retrieve -m EmailTemplate:"[FolderName]/[EmailTemplateDeveloperName" I have tried searching, but ...
0 votes
1 answer
568 views

Salesforce Marketing Cloud - Object Names

I need to extract data from Salesforce Marketing Cloud. I'm using KingswaySoft SSIS Integration Toolkit to do the ETL, but I don't know the tables that retrieve the columns I need. I've searched on ...
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 ...
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 ...
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 ...
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 ...
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 ...
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: ...
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 ...
1 vote
1 answer
1k views

"Application not found" error while authorizing an org using visual studio code

I am trying to authorize an saleforce org from VS Code using salesforce CLI but I am facing following error "Application not found" (please refer attached screenshot for more details).What should I do?...
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 ...
0 votes
1 answer
57 views

Can I have more than 15 active connections in my IntelliJ IDE?

I noticed that every time when I have above 15 active connections to Salesforce orgs, I can't do the new connection (in my IntelliJ IDE). I use Illuminated Cloud 2 plugin to connect this Is there a ...
-2 votes
1 answer
193 views

Can you delete an opportunity record type in Visual Studio code? [closed]

I am reading mixed information. Can an opportunity type be deleted?
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=&...
34 votes
7 answers
39k 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
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 ...
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 ...
0 votes
1 answer
1k views

Method does not exist or incorrect signature: void keyset() from the type Id

I think is something very small, but i dont what can be, i am new in apex class List<Deal_Registration__c> deal = new List<Deal_Registration__c>(); if (Deal_Registration__c....