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
4 views

Apex Replay Debugger Not Getting Recent Logs

I'm trying to use the Apex Replay Debugger, but when I run the command SFDX: Get Apex Debug Logs... it is an hour behind the time. I have generated many logs since then, but still the most recent log ...
1
vote
3answers
111 views

How to get custom object in VS Code

I would like to setup a dev environment using Visual Studio Code. I'm able to do that with the help of Salesforce Extension Pack. I want to fetch all custom object in VS Code. How Can I achieve this?
0
votes
1answer
58 views

Error passing challenge “Deploy a Lightning web component with a reset button”

I wrote the following code and it is working fine in my playground but get this error in passing challenge. We can't find 'lightning-input' in accountFinder.html. accountFinder.Html <template> &...
0
votes
1answer
26 views

Revert changes from git using VSCode

noob question from someone who just started using VSCode and SFDX for Salesforce development. When you make changes to a project, git tracks those changes, this is nothing new. But when you want to ...
1
vote
3answers
44 views

Visual Studio Code - Developer Console

I have been trying to use Visual Studio code over the Developer Console because I understand that this will be the new standard for Salesforce however I find myself using the Developer Console with ...
0
votes
1answer
15 views

Cannot comment .xml file by default in VScode

In VS code by default language for XML file would be ForceSourceManifest (right bottom corner of the editor). You cannot comment XML code with this.
0
votes
0answers
44 views

multiple developers working on same sandbox using visual studio code

We (Team & Org.) are new in salesforce development and not sure if our infrastructure setup is right or not. Current Setup: We have a set of 3 developers working on one developer sandbox. The ...
2
votes
1answer
20 views

Tracking managed package in source control

I have a managed package that I am testing in my sandbox from the App Exchange. I am also writing some custom classes that depend on resources in this managed package. I want to track these changes in ...
0
votes
1answer
28 views

Salesforce CLI issue while creating Project [duplicate]

When I try to create project with manifest I am getting the following error: Starting SFDX: Create Project > > 10:25:36.141 sfdx force:project:create --projectname AmDev > --outputdir c:\...
2
votes
1answer
72 views

VS Code Setup - Create project with manifest error

When I try to create project with manifest it is giving me this error: Starting SFDX: Create Project 12:39:56.757 sfdx force:project:create --projectname Dev --outputdir c:\ --template standard --...
1
vote
1answer
15 views

Editing/Retrieving webLinks, validationRules, EmailTemplates etc. without xml escape characters

We're moving our org metadata management to SFDX project. Ideally, none of the metadata files supposed to be edited by Salseforce UI. As an example, we are using Javascript Buttons, and "url" ...
0
votes
1answer
43 views

Apex in Vscode for Extend Keyword

I want to write a code for Extends keyword in apex using the sobject Contact.I am new to this.Can any one tell me how to run this code in vscode. When I try to run this Code, I got this error. ...
0
votes
1answer
22 views

VS Code project structure not matching IntelliJ and Repo

I joined a team who do not like to use VS code as it doesn't match the source GIT and their IntelliJ IDE's do. Is there any way to "fix" this in VScode? VS Code: Showing content under the normal ...
0
votes
1answer
41 views

For Loop Iteration in Apex

I wrote code for inserting 6 contacts on iteration basics. I got error unexpected token 'public'.Please help me, I can't find the error in this code. public class ContactHandler { public void ...
3
votes
2answers
48 views

VS Code - Snippets Library?

Before I go through and recreate all my most commonly used snippets in VS Code, does anyone know if these have been created for apex already? ..and if so where I can find them? I have checked in the ...
2
votes
1answer
26 views

Custom field still shown as “not existing” even though i have retrieved all custom object metadata

I have retrieved all custom object metadata for Account, including the referenced custom field, but vscode is still showing it as not existing.
1
vote
2answers
54 views

VS Code: display *.js-meta.xml files in the Explorer

In VS Code, I frequently need to update *.js-meta.xml files used with Lightning Web Components. By default, VS Code does not display these files in the Explorer for my Salesforce project. Is there a ...
1
vote
1answer
26 views

prettier-plugin-apex vscode printWidth not working

Started using prettier-plugin-apex and by default the printWidth is 80, I changed it to 120, but it still defaults to 80. Changed at both user and workspace level. I see this ( "prettier.": 120,) ...
1
vote
0answers
22 views

Visual Studio Code Deploy Issue

I am trying to deploy an utility class by adding a small method. The method implementation is below. public static boolean isId(String strValue) { return strValue instanceOf Id; } When I try ...
1
vote
1answer
26 views

SFDX Deploy: How to prevent accidental deploy to my Packaging Org

From VSC, I'm deploying to my Dev Org often. I'm concerned that I may be authorized to my Packaging Org and accidently deploy code there. In theory, the only deploys to Packaging Org should be from ...
2
votes
1answer
49 views

VSCODE intellisense working with SOBJECT fields, but not showing variables just created

Salesforce VSCode extension pack intelliSense seems to be working with nearly everything including intelliSense for showing all fields of SOBJECTS except it is not show variables I have just created. ...
3
votes
0answers
44 views

A folder structure that follow enterprise design patterns

I come from ASP.net background and I used to have a standardized folder structure such as this. I just jumped on a huge project with a lot of custom code. I'm sick of having to scroll through ...
3
votes
2answers
51 views

VSCode will not show context options when using scratch org

I have set up a few scratch orgs, but am running into an issue with VSCode. When connected to a "normal" developer org, I am shown various options and context menus (eg, deploy manifest etc). When I ...
1
vote
2answers
46 views

Deploying mdapi and source to org is failing with “Unexpected file found in package directory”

I'm having trouble deploying my mdapi Steps: sfdx force:mdapi:retrieve -s -r ./mdapipkg -p -- This gets the latest version of managed package from our Packaging Org -- I did not convert to the new ...
1
vote
0answers
23 views

Unable to Authorize Salesforce org using SFDX : Trailhead as it shows API is disabled

I am doing the Salesforce Trailhead Lightning Web Components. After I've created a project, I'm trying to "Authorize an org", but keep on receiving an error saying "API is disabled for this user" as ...
0
votes
1answer
970 views

Not able to create a project in vs code?SFDX: Create Project failed to run [duplicate]

This is the following error i am getting.... Starting SFDX: Create Project 11:39:05.943 sfdx force:project:create --projectname gfgfgf --outputdir c:\Users\SAMEER\Desktop\ToDoManager --template ...
1
vote
1answer
493 views

My VSCODE (SFDX) is not running - Command failed with ENOENT: npm

All was working fine till the morning untill, in the afternoon when i tried to run some create LWC commands. Now, no SFDX commands will work, i am getting the following error : 04:30:38.633 sfdx ...
0
votes
0answers
36 views

Unable to use RestContext in VSCode

I had to start using VSCode from IntelliJ (Illuminate Cloud). Surprisingly, all my services are throwing compilation errors. @HttpGet global static list<Lead_Behaviour__c> getLeadByParams() { ...
1
vote
2answers
51 views

VSCode not showing success alert

I clicked on "Show Only in Status Bar" by mistake. Now when I successfully deploy Salesforce apex code in VSCode, I only get the first alert to show the deployment is running. But the second alert ...
2
votes
3answers
91 views

How to diff metadata from Github with my managed package

SFDX looks promising for this, but I'm confused and am running out of time. Your help is appreciated. It seems this could do what I need... sfdx force:source:diff But it appears to only work on ...
1
vote
1answer
27 views

How to edit setup SFDX_APEX_LOG_COLOR_MAP in VS Code

Following a blog post about debug logs on this page, we're able to customise the colour the command sfdx force:apex:log:tail outputs by using the SFDX_APEX_LOG_COLOR_MAP environment variables. Like ...
0
votes
1answer
30 views

Metadata shown as modified When Pulled from Sandbox

When I retrieve metadata from my sandbox through a package.xml,there are lot of files(Classes, fields, Aura etc) that are shown as modified(M) in my local repository but when I try to check the diff,...
1
vote
1answer
28 views

Using VSCode to debug or test apex

I retrieved source files from org using SFDX commands in VS code and then I updated some code and saved the file. However, when I try to run the anonymous debugger using SFDX: Execute Anonymous ...
2
votes
1answer
62 views

SFDX uninstallation/update issue

All of a sudden SFDX has stopped working in my MAC laptop. I am unable to retrieve or deploy code. Hence I thought of updating sfdx using the command sfdx update which gave the below error. /Users/...
0
votes
1answer
52 views

SFDX VSCode Unable to Authorize an Org

I've been working using VSCode to develop Lightning Web Components for over 6 months, however today after restarting my machine I am unable to authorize my org. It was able to redirect me to the login ...
0
votes
1answer
33 views

Invalid reference FullCalendarJS of type resourceUrl in file fullCalendarJs.js

I am trying to deploy to my dev org a custom calendar lightning component https://github.com/Gurenax/sfdx-lwc-fullcalendarjs. I have copied the code but the problem is when i try to deploy it i get ...
1
vote
1answer
152 views

I am getting this error: ERROR running force:source:deploy: The Flow named ListingID_Update was not found in the workspace

I am receiving this error while trying to deploy to a sandbox using sfdx source deploy commands. This the error: ERROR running force:source:deploy: The Flow named ListingID_Update was not ...
-1
votes
1answer
20 views

Help on System.ListException: List index out of bounds: 0 Error

I'm trying to write test code for my custom controller and got a new error that I haven't gotten before. My research so far has told me that misallocated and/or coming up NULL. Apex Class: ...
1
vote
2answers
63 views

Production Deployment of CustomLabel using VS Code (INVALID_ID_FIELD: Source validate did not run tests in the org)

I am trying to deploy customLabels to the production org. But, I am not able to deploy it as it asks to run the test classes. As we know the custom label is just the configurations, not the codes. So, ...
0
votes
1answer
32 views

The deploy is still in the Queue while saving in VSCode Project with manifest

I'm encountering an issue while trying to save a file in VSCode in a project with manifest. It is not a sfdx project. While pushing to org, I randomly get this error since a few days now : Starting ...
1
vote
2answers
2k views

Deployment to Production Org using VS Code

I need one help to deploy different components like classes, triggers, objects, profiles, permission sets, etc from sandbox to the production org. I used following command to deploy all the items on ...
0
votes
2answers
45 views

LWC Not Redering HTML

I am starting out creating a lighting web component, following the Hello World Example. I have set up a Sandbox environment and Authorised the org in VS Code. I have set up a project with manifest and ...
2
votes
1answer
42 views

Unable to navigate code path for a specific project in VS Code

I am having trouble with navigate the code path by using "Go to definition" / "Peek Preview" for one project. I also don't see any SFDX commands on Command palette. The project has below structure. (I ...
0
votes
0answers
34 views

How can I Authorize an existing Project in VS Code

I am new to VSCode and and trying to switch from Eclipse and this is becoming already painful.My end goal is to reconnect an existing project I already created with an existing Sandbox. I already ...
3
votes
1answer
40 views

How do you run all the Jest LWC tests at once in VSCode?

The "Run Test" link is provided for each test as illustrated below. But what is the easiest way to run all of the tests in the file?
1
vote
0answers
28 views

Checkpoints in 'VS Apex Replay Debugger' doesn't expand the list variables

Currently we are using checkpoints so that we can view the detailed data inside the list variable which is a limitation using breakpoints.If you look at the below screenshot it doesnt show the data ...
0
votes
0answers
35 views

VS Code : Get Apex Debug Logs : Not getting the latest debug logs

I started using Apex Replay Debbuger last weeks. It was working fine. But suddenly it stopped working as the latest debug logs are not showing you in the VS code. I tried all possiblities of re ...
1
vote
1answer
239 views

Error While creating a Project on VSCode

I have installed Salesforce CLI and then tried to create a Project in VSCode using SFDX: Create Project. But facing the following error. Do I need to install any additional package? ERROR:Cannot ...
0
votes
2answers
84 views

VSCode Salesforce Cli integration stopped working after update

I am having trouble working with CLI on VSCode. I think there was an Visual Code update which i did and after which VScode and apex integration stopped working. Looking at the VSCode console gives ...
0
votes
0answers
21 views

Debug Warnings in VSCode

A coworker gets warnings while editing JS files (e.g. misspelling variable names, missing semicolons, missing closing brackets or parentheses...). That doesn't happen on my VSCode. I don't see ...

1
2 3 4 5