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

Formatting Visualforce Pages in VSCode on Save

can someone confirm how to get prettier working with visualforce pages on save in VSCode? I have tried in a fresh project but it never works. Steps taken: SFDX: Create Project npm install SFD: Create ...
0
votes
0answers
9 views

VS Code Authorize an Org while using remote SSH

I have a remote linux machine to which I am connecting via remote SSH in my VS Code. I use "Remote - SSH" VS code extension for the same. I could browse remote directory in my VS Code and do ...
0
votes
0answers
32 views

Connect TIMEDOUT error Salesforce CLI while trying to open org

I am trying to authorize my org but i am facing an error below any idea why the error occurs and how to resolve Starting SFDX: Open Default Org 20:13:52.519 sfdx force:org:open Error: connect ...
0
votes
1answer
28 views

How to ignore SLDS token problems(Infos) in VSCODE?

I'm developing lwc in VSCODE, and today my editor suddenly shows a bunch of SLDS problems just like this it is annoying and I do not want to fix it by update the token to a new version or make a ...
0
votes
0answers
35 views

VSCode sfdx deploy error after authorizing: Error authenticating with the refresh token due to: expired access/refresh token. Able to retrieve

I'm experiencing an issue where I can authorize an org from VSCode, but can not deploy to the org. Interestingly enough, I can retrieve from the org - when I type in the command from the terminal, not ...
0
votes
1answer
22 views

Error: 'read ECONNRESET' unable to retrieve components in vscode

In VS Code, I performed these steps: Ran the command 'SFDX: Create Project with Manifest'. Ran the command 'SFDX: Authorize an Org' and authorized the org. Right-clicked the package.xml file and ...
0
votes
0answers
20 views

Not able to create Scratch Org in VS Code

I am trying to create a scratch org from VS code but it shows me an error. It says "connect ETIMEDOUT 101.53.168.237:443" I was able to do it correctly few days back - all of a sudden its ...
0
votes
0answers
26 views

Unverified Breakpoint: Apex Replay debugger not stopping at the break points in VS Code

I am experiencing an issue with the Apex Replay Debugger on my Mac. When I am trying to replay a log file in Apex Replay Debugger in VSCode, the debugger never stops at the specified break point. When ...
0
votes
3answers
36 views

Unable to retrieve workflow rule from case comment object

I have created a new workflow rule for Case Comment object. When trying to retrieve from org browser getting this error "Cannot read property 'split' of undefined" and when i tried to ...
1
vote
1answer
76 views

Local server connection Issue with Lightning Web Component in VS Code

I was trying to connect local server with the lightning web component in Vs code.I have written the following command in terminal sfdx plugins:install @salesforce/lwc-dev-server But I am getting this ...
1
vote
1answer
67 views

No Package.xml Found In Destructive MDAPI Deployment

I've already looked at the existing questions and made sure of the following: Only package.xml & destructiveChanges.xml are in the folder I'm trying to deploy. package.xml is empty outside of the ...
1
vote
1answer
35 views

How do I prevent developers from deploying directly to Devhub and instead push the code to sandbox?

I have a production org that is the Devhub. I have a full copy sandbox. I want that the developers that are working on their respective scratch orgs, don't deploy their changes to production directly. ...
3
votes
1answer
344 views

Salesforce VScode retrieve from org “Cannot read property 'split' of undefined”

I was using the "Retrieve source in manifest from org" command for the resources in package.xml file. However when I executed the command it failed saying "Starting SFDX: Retrieve ...
0
votes
0answers
32 views

Running SFDX: Create a Default Scratch Org doesn't create a scratch org

When I run the command SFDX: Create a Default Scratch Org.. it doesn't creating the scratch org, the banner of the command is still there and the command prompt doesn't show any error. Any help would ...
1
vote
0answers
30 views

How to write a meta data for an object (Standard Object and Custom Object )?

I want to create meta data file so that I can enable field history tracking and there is no need for manual enabling in sandbox. I want this metadata file to work with Jenkins pipeline. I have to do ...
1
vote
1answer
38 views

YML scripts for deploying changes into DEV instance

I have the below bash script to deploy the changes are checked in to Azure Devops to the Salesforce instance. Script runs as soon as checkin made to DEV branch it is all working good sfdx force:...
0
votes
1answer
27 views

Where to place eslintrc.json and jsconfing.json when we use multiple package directories?

Should I have signle jsconfing.json and eslintrc.json in sfdx project that is in fact monorepo or I need separate configurations for each directory/package? What are pros and cons of mentioned ...
0
votes
0answers
27 views

How to stop the panel from opening up when you save in VS Code?

Whenever I save my code in VS Code, the bottom panel opens up, and I have to manually close it. Is there a way to suppress it, or have it 'auto close'? I checked my settings for panel and Save and ...
0
votes
1answer
16 views

error on page while displaying lwc component on record page

i want to create account records using lwc with its 6 fields. code was deployed successfully but when i deployed it on page it gives error-the page has error you might need to refresh it. here is my ...
0
votes
0answers
11 views

Turn on Replay Log Debugger fails in Visual Studio Code

I'm getting an error when trying to use the 'turn on Apex debug log for replay debugger' command in Visual Studio Code. VS-Code version 1.15.2 sfdx-cli version sfdx-cli/7.98.0 linux-x64 node-v15.14.0 ...
0
votes
0answers
22 views

show list of account record on clicking in checkbox and delete the selected account and refresh list

I want to show account record on checking a checkbox and delete the selected record and refresh list but I am getting errors. duplicate value found: duplicates value on record with id: Cannot find ...
2
votes
1answer
82 views

SFDX - LWC1001: Unexpected compilation error: did not find a shallow_cmp function for AST_Chain

Problem: After developing 4 LWC components then deploying to a scratch org via SFDX: Push Source to Default Scratch Org, the Salesforce CLI returns: LWC1001: Unexpected compilation error: did not find ...
0
votes
0answers
27 views

Several Salesforce Sandboxes/Projects Code & Metadata in ONE Workspace without causing ERROR: Error deploying or retrieving source

I'd like to have code/metadata from different Salesforce Orgs (Sandboxes and Prod) in VSC/SFDX and be able to quickly access it. For that, I have tried to use VSC's Workspaces and have added 3 folders ...
0
votes
1answer
48 views

Bring validation rule to VS Code project

I am new to Salesforce and I have a question regarding to my first real task so I don’t make nothing wrong. I have created a new validation rule in my sandbox and I want to bring this to my Visual ...
0
votes
1answer
23 views

Where should the apex tests be located in the LWC project?

I wrote an Apex test (in the Developer console) for a method that is used in my LWC project. How do I upload it to my project in VSC?
0
votes
1answer
47 views

deploy connected app from dev to test [duplicate]

I created a Connected App in a dev environment and now I need to duplicate it in a test environment. Can this be done via a changeset, VS Code, or does it need to be done manually? Thanks,
0
votes
0answers
37 views

Receiving error No base file for markup://c:DesignLwcDemo while deploying this to org

I am getting error No base file for markup://c:DesignLwcDemo while deploying this to org <template> <lightning-card title="Design Attribute" icon-name="custom:custom5">...
0
votes
2answers
33 views

Error while using custom events in lwc

I am trying to setup child to parent communication in lwc but i get error No MODULE named markup://c:customEventChild found : [markup://c:customEventParent] CustomChildEvent.html <template> <...
0
votes
0answers
32 views

Faced issue in installing sfdx plugins:install @salesforce/lwc-dev-server

i am trying to view component locally in vs code but when i run sfdx plugins:install @salesforce/lwc-dev-server this command i get error C:\HelloWorldLightningWebComponen>sfdx plugins:install @...
0
votes
2answers
31 views

VS Code shows modified file

We are working on two types of OS - Windows and Mac. I'm just retrieving code from org and VS Code shows that it is modified, but it doesn't. How to resolve that?
1
vote
1answer
29 views

How to have VS Code only create some of the component files by default?

In VS Code, when I create a an Aura Component, it creates the full Aura Component Bundle with all the files. Is there a way to limit what it creates? Ideally, limit it to the helper, controller, cmp, ...
1
vote
0answers
41 views

How to deploy code to SF instance from your branch?

Can I deploy my git branch to salesforce org? Currently, I write my code in vscode and deploy it to org using vscode. If it works, I add that code in the git branch and commit, which gets merged later....
0
votes
0answers
212 views

VSCode deploy source to org failed to run

Starting today VSCode is giving me an error "SFDX: Deploy Source to Org failed to run". This only happens with 1 org. with every other org I do not have any issues. I don't get any error ...
0
votes
1answer
38 views

VS Code drops leading zero in picklist metadata values

I'm having picklist metadata problems with VS code and a regular sandbox (not a scratch org). I'm using source format with the sandbox. I have a picklist where some values have leading zeros, e.g. &...
0
votes
0answers
35 views

Unexpected file found in package directory:

I am trying to deploy some components from github branch to dev sandbox with VS Code I am on the branch, where I have a code, and connected to the sandbox. I tried: sfdx force:source:deploy -c -p ...
1
vote
0answers
63 views

How to correctly enable Type checking in VSCode for LWC?

I wonder how to sucessfully configure type checking in VSCode for LWC. VSCode has JS/TS compiler that support type checking when we set jsconfig.json with compilerOptions like below: "...
1
vote
1answer
25 views

VScode doesn't highlight/autocomplete code (salesforce extension pack)

This is what I see in VScode: I have the Salesforce extension packed installed, but I'm not sure everything's working correctly here. Keywords "with" and "sharing" are not ...
1
vote
2answers
122 views

Salesforce Git Repository using VS Code

I am trying to set up the Git Repo for our Salesforce instance, we are trying to use VS Code. This is my first time setting up and never used the ANT migration tool. We do manual Change set deployment ...
0
votes
1answer
40 views

Unexpected Token for Safe Navigation Syntax

I have some code like: if(s.Primary_Filter_Values__c?.containsIgnoreCase(billingState) || s.Primary_Filter_Values__c?.containsIgnoreCase(billingCountry)) {} VS Code is throwing me an unexpected token ...
2
votes
1answer
166 views

Visual Studio Code Prettier plugin for Apex not formatting VisualForce [closed]

I've been using VSC for ages now and have had the apex Prettier plugin installed and working, but it is no longer formatting my Visualforce pages (it's still doing it for apex classes). I now get this ...
2
votes
0answers
47 views

SFDX:Diff File Against Org command not working only for Apex Classes

In my VS Code, when I right-click on an Apex class I can't see 'SFDX:Diff File Against Org' command. But this is perfectly working for Aura components or Visualforce Pages. The problem only exists ...
0
votes
0answers
126 views

SFDX: Retrieve This Source from Org Not Deploy Metadata

I am using VS Code and did the below steps: Ran the command 'SFDX: Create Project with Manifest'. Ran the command 'SFDX: Authorize an Org' and authorized the org. Right-clicked the package.xml file ...
1
vote
1answer
35 views

Visual Studio Code Apex Replay Debugger Unsupported Java Error

I'm trying to use the Apex Replay Debugger on VSCode on an Apple MacPro (Big Sur) but get a 'Unsupported Java version'error. I have followed all the instructions https://developer.salesforce.com/...
1
vote
1answer
175 views

'SFDX: Retrieve Source in Mainfest from Org' not retrieving the components

In VS Code, I performed these steps: Ran the command 'SFDX: Create Project with Manifest'. Ran the command 'SFDX: Authorize an Org' and authorized the org. Right-clicked the package.xml file and ...
0
votes
1answer
16 views

What values to put into npm init when following workaround instructions to get eslint working in sfdx project?

I'm experiencing the same problem as the poser of this question: Why is ESLint not working properly for Lightning Web Components in VS Code and how to make it work? One of the steps is to run npm init ...
1
vote
1answer
49 views

Can't connect cloned repo to sandbox in VS Code

I'm using VS Code, Bitbucket, and a standard sandbox (not scratch org).  What's the correct procedure to clone an existing repository and connect it to the sandbox? I've read this question/answer but ...
0
votes
0answers
82 views

Error: INVALID_SESSION_ID: Session expired or invalid

I have an error when I try to uploud the code from VSCode in Salesforce organization. The error is this : Error: INVALID_SESSION_ID: Session expired or invalid I have a lightning web component and I ...
2
votes
0answers
28 views

sfdx force:org:list hangs

When I run the following command in either the VS Code terminal window, or a Windows Command Prompt, it returns all of the orgs, but hangs: sfdx force:org:list Is there some other way I should be ...
3
votes
1answer
237 views

How do I best switch versions of sfdx and plugins?

When there are bugs in different versions of SFDX CLI and the Plugins: There is a need to switch to another version. But I find uninstalling and re-installing too time consuming. Often people post ...
2
votes
1answer
27 views

How to Re-Enable VS Code Errors

I'm experiencing a strange phenomenon in which errors (I believe compile errors) are no longer being picked up by the VS Code SFDX code. Normally when I run "SFDX: Deploy this source to org",...

1
2 3 4 5
8