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
1 answer
29 views

Viewing apex code completion details after sf deploy fails

I'm writing an Apex trigger and testing it against a Salesforce developer instance. I've been writing the code in VS Code, and deploying by running sf deploy. When I run sf deploy the Test results ...
-1 votes
0 answers
20 views

getaddrinfo ENOTFOUND login.salesforce.com

we have integration streams running on a server, many of which fail apparently due to DNS problems. However, the server in question, is natted with the public IP of the external firewall and uses ...
0 votes
1 answer
25 views

VSCODE Log for Replay Debugger Inconsistent with current code

After pushing code, setting breakpoints, enabling Log for Replay, running tests and Retrieving Debug logs When I step through, the pointer seems to be pointing at phantom code lines, and seems as ...
0 votes
1 answer
40 views

Assert not available in VSCODE

The Assert class does not appear to be available in VSCODE with extensions installed. While I can still use the class and its methods with no errors on Push , the editor complains about it and there ...
0 votes
0 answers
37 views

Error parsing file

I am having difficulties deploying reports and dashboards from dev org to another dev org. After retrieving the metadata ( report folder , dashboard folder, reports and dashboards) i want to deploy by ...
0 votes
2 answers
57 views

Unable to install lwc-dev-server / run sfdx force:lightning:lwc:start

I am trying to run LWC in local. I was able to install with errors C:\WINDOWS\system32>sfdx plugins:install @salesforce/lwc-dev-server Polling for new version(s) to become available on npm... done ...
  • 101
1 vote
0 answers
53 views

VS Code/sfdx: authorization fails with reason: self-signed certificate in certificate chain

I have been using VS Code and Salesforce since a year in my company laptop. I am trying to authorize VS code with my sandbox. Process I followed: VS Code> Sfdx auth org shortcut Also tried sfdx ...
0 votes
0 answers
29 views

SFDX: Authorize an Org Failed to run [closed]

I have a problem authorizing my org via VS Code. It gives me this error when I try to run SFDX: Authorize an Org. Can someone help me with this?
0 votes
0 answers
37 views

The value for targetId in Community1/variations/userProfileDataAccessRequestComponent.json isn't valid. Check the value and try again

I have enabled Enable ExperienceBundle Metadata API and tried to retrieve a Experience Bundle community via VS Code but obtained an error. The value for targetId in Community1/variations/...
0 votes
1 answer
59 views

VSCode search results doesn't show all instances

I'm trying to figure out what's wrong with my search panel in VSCode when searching in a branch from BitBucket. When I try to look for a specific search term, it doesn't find ALL instances of that ...
0 votes
3 answers
128 views

org browser in vs code not working

After authorizing the sandbox in vs code, it tells me it failed. However, the org is connected successfully. I can retrieve the file from or deploy the file to the org directly in the file. it is ...
-1 votes
0 answers
36 views

Error 405 Only POST allowed deploy LWC from VS code

I am trying to deploy LWC from VsCode to my Sandbox and got the below error tried All the steps based on this - No Luck Error 405 Only POST allowed when deploying code from VsCode to Org Note: ...
0 votes
1 answer
37 views

SFDX CLI: Error authenticating with the refresh token due to: inactive user

After running the command: sfdx force:auth:web:login --setalias vscodeOrg --setdefaultdevhubusername And getting a successful result: Successfully authorized robs@example.com with org ID ...
  • 8,788
1 vote
1 answer
60 views

Apex Code Formatter for SOQL

I want SOQL fields should be in the same line, not every field goes to a new line, Current : Expected : SELECT Field1, Field1, Field1, Field1,.... FROM Object WHERE ... .prettierrc { "...
  • 978
0 votes
1 answer
110 views

retrieve dashboards/reports with vscode package.xml

In vscode, I want to retrieve dashboards so that I can include in version control and deploy to another org. What is the syntax? I've tried using DeveloperName, replacing spaces with underscores, not ...
  • 593
0 votes
1 answer
33 views

Installing/Configuring SFRA on Mac

So i am having trouble installing SFRA on Mac i am currently referring this documentation where it says Cloned all the repository from git that includes (storefront-reference-architecture, ...
0 votes
0 answers
48 views

How can i delete an experience view from salesforce?

i have a problem that i can't retrieve experience bundle due to a json view that generates errors , so i have to delete that view so that i can retrieve the code from the sandbox . i had many searches ...
  • 1
0 votes
0 answers
45 views

VS Code / Apex Debugging - Error Setting Checkpoints: Required fields are missing: [ExecutableEntityId]

I am using VS Code to debug apex code. I am getting the following error when I try to update checkpoints (SFDX: Update Checkpoints in Org): Required fields are missing: [ExecutableEntityId]. URI=file:/...
0 votes
0 answers
62 views

Experience Bundle Deployment

Im trying to deploy the site using Experience bundle. What I observed while retrieving it in VS code is, for the site where I am not using custom theme, I can see "componentAttributes" : { ...
0 votes
1 answer
35 views

Can VS Code compile classes automatically in the background like the Dev Console?

The online Dev Console automatically compiles every few seconds and checks for any kind of undefined variable, but in VS Code you can type all kinds of jibberish that won't throw any errors in the ...
  • 888
0 votes
0 answers
36 views

SFDX: Retrieve Source from Org - no error but did not retrieve record type

sfdx-cli/7.173.0 win32-x64 node-v16.17.1 Salesforce CLI Integration V55 trying to retrieve from source for a record type. Get below in CLI output: ended SFDX: Retrieve Source from Org BUT going to the ...
  • 73
7 votes
2 answers
9k views

Component conversion failed: This directory does not contain a valid Salesforce DX project

in VS code, while trying to deploy source to org, getting a weird error below: Component conversion failed: This directory does not contain a valid Salesforce DX project. But I do have sfdx-project....
  • 73
0 votes
1 answer
71 views

deploying only modified reports from sandbox to production via vscode

my use case : fix reports in bulk when there is a change, such as a replacement on opportunity stage. note: we do not use source tracking - we use sandboxes for development. first, i download all ...
  • 4,355
0 votes
1 answer
83 views

When running anonymous apex in VS Code can I filter the output to show only the system.debug?

When running anonymous apex in the Developer Console, you have the option to filter down to show only the Debug lines - is this possible when running anonymous apex from VS Code? I see the full output ...
0 votes
0 answers
68 views

jest lwc code coverage overlay not working

I can't get lwc jest code coverage overlay to work in vs code. I have installed the jest extension. jest.config.js is there with the following code: const { jestConfig } = require('@salesforce/...
  • 61
1 vote
0 answers
173 views

ERROR: We can’t query your org. Make sure that you’re connected to this org and have permissions to view the object and fields

I am getting this error when ever I try to authorize the Scratch Org, DevHub or any other sandbox. ERROR: We can’t query your org. Make sure that you’re connected to this org and have permissions to ...
0 votes
0 answers
37 views

"Push to Scratch Org" is successful but no data is in Salesforce scratch org

I have a big bunch of code I'm trying to get to merge - it's from building an Experience Cloud portal which took a few weeks so it fell way behind our master. We've managed to get the code largely ...
  • 1
0 votes
1 answer
171 views

Unexpected end of JSON input when trying to authorize my sandbox from vscode

I am trying to authorize my sandbox org from vs code > After logging in with my credentials, I keep on seeing this output from the browser which I Quoted below "Unexpected end of JSON input ...
0 votes
0 answers
83 views

Disable deploy to org from package.xml in Visual Studio Code

In VS code, by mistake I right clicked on package.xml and clicked to deploy source to org. Instead of right clicking on just my changed file. How can I avoid such mistake in future? Can I disable ...
0 votes
0 answers
253 views

SFDX: Deploy Source to Org failed to run with no error message

I cannot deploy the source in my VSCode to Org. The system shows SFDX: Deploy Source to Org failed to run with no error. I could retrieve and diff code from org normally. Can anyone solve this? Here ...
1 vote
1 answer
2k 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
  • 359
0 votes
0 answers
53 views

VScode Error while Deployeing LWC component (reading 'split') undefinrd

I am getting error while I am deploying the LWC component ERROR running force:source:push: Cannot read properties of undefined (reading 'split')I don't use any split property in my code, I also try ...
0 votes
1 answer
58 views

Trying to update metadata and deploy using VS Code

Trying to learn VS Code. Im trying to update a permission set from VS code and deploying to Salesforce. I'm getting the error below. I am an admin but not sure why I can't deploy the change? Anyone ...
0 votes
1 answer
36 views

System.debug message only shows in logs when outside of classes or methods in VScode

I'm trying to see the system.debug message in the output console log when I run the SFDX: Execute Anonymous Apex with Editor Contents, but it doesn't seem to want to appear. I've seen a lot of ...
  • 11
1 vote
0 answers
287 views

VS Code Diff against Org not working anymore - retrieve still works

Since a few days I am not able to compare my code to that the of the Sales Cloud server anymore via "SFDX: Diff File against Org". I receive this error message in VS Code: 09:15:09.774 ...
0 votes
1 answer
484 views

exclude search strings from vscode search results

I want to search the files having "write" but at the same time I don't want my search results to include "writeful". So if there is write writeful writer fwrite foowrite Write I ...
0 votes
0 answers
53 views

Error when using SDFX: Create Function in VSCode

I am getting the error below when using SFDX: Create Function from VSCode. My VSCode and Salesforce CLI are up-to-date. Also, I am successfully able to generate a function using the CLI command sf ...
  • 273
0 votes
1 answer
108 views

Unable to Retrieve Profile Metadata in VS Code due to Special Characters

I am attempting to pull Salesforce Profile metadata into Visual Studio Code and the process is failing with the following error: Metadata API request failed: Component conversion failed: ENOENT: no ...
1 vote
1 answer
493 views

ERROR running force:org:list: Parse error in file unknown on line 1

when I am trying to get org list using command sfdx force:org:list It is showing me an error: ERROR running force:org:list: Parse error in file unknown on line 1 earlier it was working fine I am ...
  • 35
14 votes
7 answers
15k views

Deploy source to org fails with "No authorization information found"

I'm just getting started with developing in VS Code and have been following the steps here. I was able to authorise my org with the default alias according to the steps here: The authorised org also ...
0 votes
0 answers
39 views

Syncing my master branch with local developer sandbox

I tried checking out master branch and ran the following command in vscode sfdx force:source:deploy -u Sandbox -p force-app/main/default -l RunLocalTests After that also i don't think master branch ...
1 vote
1 answer
165 views

Enum syntax errors in Visual Studio Code

vscode is constantly giving me syntax errors when it comes to enum declarations. Do you know if there is any particular setting that I should switch so that the errors will disappear?
  • 380
0 votes
0 answers
24 views

Salesforce extensions not working/visible in multifolder structure

As in the title, I've got a project where we have a structure like the one in the picture below: In the java folder we have everything related to the Java code we've put on the Heroku server and ...
  • 25
1 vote
2 answers
1k views

How can I get picklist values from Custom Metadata Type?

I'm building LWC component and I have custom metadata type that has picklist field with 70 values. I need to display them as options in dual-list-box in LWC. Is there any imports that I can use to ...
0 votes
0 answers
56 views

I can't see the complete sfdx commands on vscode, Authorize an org fails and Apex extension unresponsive

I'm working on the Quick start: Lightning web component trail and when it comes to setting up vscode with salesforce I've been trying for the past  24 hours to no avail. Things  have and have tried so ...
  • 1
0 votes
0 answers
546 views

Bulk insert data in Custom Metadata Type using SFDX cli

I have created a Custom Metadata type in my developer Sandbox. I want to insert data from csv file using cli in vs code. It is giving me error. sfdx force:cmdt:record:insert --filepath .\Aperia.csv --...
1 vote
1 answer
195 views

How can I delete LWC using SFDX in VS Code?

I've retrieved my LWC source from the org, and then tried right clicking on the component folder in VS code (under force-app\main\default\lwc) and clicking SFDX: Delete from Project and Org, which ...
  • 163
1 vote
1 answer
2k views

How to retrieve Custom Metadata Type records in VS Code Using Package.xml

I have created a My_Custom_Metadata__mdt(Custom Object) in a Salesforce org, also I have created a few records under this custom metadata. Now I want to retrieve these records in VS Code so that I can ...
  • 11.4k
0 votes
0 answers
88 views

Problem while I tried to deploy lwc component to org

Javascript import { LightningElement } from 'lwc'; import { showToastEvent } from 'lightning/plateformShowToastEvent'; export default class MyApp extends LightningElement { handleAlertClick() { ...
1 vote
2 answers
310 views

Deploy source to org fail!

I am working Lighting Web Component and when I try to deploy my code from the js file the deployment fails with following message: === Deploy Errors PROJECT PATH ERRORS ...

1
2 3 4 5
10