Questions tagged [salesforcedx-cli]
Questions relating to the `sfdx` binary that is supplied as part of the tools suite for Salesforce DX.
832 questions
0
votes
0
answers
35
views
SFDX Retrieve Will Work Once, Then Always Time Out
Very frustrating issue that has suddenly appeared - if I create a brand new project, I am able to retrieve once, and then after that, retrieves just time out. I have upgraded CLI, downgraded CLI, ...
0
votes
1
answer
47
views
Where to see the 2GP Managed Package I have created using CLI, in Salesforce Org?
I have created a 2GP manage package using Salesforce CLI and also promoted it to a manage package.
Using the following commands I'm able to see the package details in terminal.
And when I create ...
0
votes
0
answers
14
views
LWC not being added in the packaging although specified in the package.xml
I have a simple lwc with helloWorld, the building with npm run test:lwc is success but it's not being added in the packaging.
Here's my package.xml,
<?xml version="1.0" encoding="UTF-...
0
votes
0
answers
22
views
Not able to retrieve/deploy Record Triggered Flow along with Custom Errors [Salesforce
Usecase: I've implemented a Record Triggered Flow to display dynamic error message on the record page based on some business rules(Used Custom Error for displaying error). I want to retrieve this ...
-1
votes
0
answers
34
views
Salesforce lwc jest test failures
I'm new to Salesforce and I"m doing Gitlab pipeline poc. Can someone give me a clear and concise explanation on why the lwc jest test have failures?
Here's the link of my public Gitlab pipeline,
...
0
votes
0
answers
49
views
Updating CLI via Terminal in VSCode - ·TypeError: Cannot read properties of undefined (reading 'statusCode')"
I'm trying to update Salesforce CLI via the terminal (using the command "sf update", but I'm getting the following error:
TypeError: Cannot read properties of undefined (reading 'statusCode')...
0
votes
0
answers
102
views
SLDS Validator Error in VS Code
I am getting this error in VS Code with Salesforce Extensions for VS Code installed.
This looks like a proxy error, Where do i configure proxy for this?
Has anyone faced this error and resolved it?
...
0
votes
1
answer
55
views
Salesforce retrieve tab, apexclass, apextriggers, lwc-app, custom field
I'm new to cicd of salesforce and I'm trying to sync from dev hub to my project.
This how I created the project/repo, the -x is important to create the manifest/package.xml,
sf project generate -n ...
2
votes
1
answer
124
views
Authorize an org failed in VS code but not in the browser
Problem statement : I am able to create a project, but when I try to authenticate an organisation using VScode, it takes me to a browser where I have to enter my credentials. 'Authentication ...
2
votes
1
answer
78
views
Error: getaddrinfo ENOTFOUND using sf org login jwt and with proxy [closed]
I can login using salesforce jwt on my laptop with direct internet connection, no problem.
Here are the commands,
token=<omitted>
url=https://testing-dev-ed.my.salesforce.com
user=email@gmail....
0
votes
2
answers
53
views
sf project deploy succeeds but LWC is not updated in scratch org
I am using sf project deploy start to deploy changes in my scratch org on a Lightning Web Component. The command works correctly: it tracks the changes in the components correctly, succeeds and shows ...
0
votes
1
answer
141
views
Salesforce CLI update fails
For some reason, sfdx update isn't working on my laptop. No matter what I do, I always get the following error:
C:\Users\Some.User>sfdx update
@salesforce/cli: Updating CLI from 2.63.8 to 2.63.8-...
-1
votes
1
answer
42
views
Configuration of the Salesforce CLI connected app
Do we know the exact configuration of the Salesforce CLI connected app?
While developing and testing my own connected app, I saw the Salesforce CLI listed along with my own connected app in ...
1
vote
2
answers
360
views
Salesforce CLI Deployment Warnings: GlobalValueSet returned from org but not found in local project
I'm encountering an issue when deploying using the Salesforce CLI. Although the deployment completes successfully, I receive several warnings like these:
Warning: GlobalValueSet, Value_Set_One__gvs, ...
0
votes
0
answers
74
views
Getting bin/sf: No such file or directory error after uninstalling sfdx
I was following the salesforce document's guide to uninstall sfdx first then install sf commands. Then I encountered this error:
/Users/shiy2/.local/share/sfdx/client/bin/sf: line 16:
/Users/shiy2/....
0
votes
0
answers
52
views
Salesforce CLI installation issue using NPM
I do not have admin access so I am forced to install Salesforce CLI using NPM.
NodeJS version - v20.14.0
openjdk version "22.0.1"
When I run nodeJs terminal, I can see there "@...
0
votes
1
answer
25
views
Salesforce User with a certain profile can only delete contact base on Account.field__c and the user.field__c is the same
Salesforce User with a certain profile can only delete contact base on Account.field__c and the user.field__c is the same.
do you guys have any ideas on how to do this. I need the user to delete a ...
0
votes
1
answer
39
views
How can I retrieve and deploy files (content document / version) via CLI?
I would like to implement Insert or Update Blob Data for ContentVersion. Specifically to retrieve and upload Documill Templates via command line for future use in GitHub actions. How can I do that ...
0
votes
0
answers
41
views
Profile metadata doesn't contains Layout Information when fetched using Salesforce CLI
I am trying to create a bash script which will backup my org's data daily. For that I thought salesforce cli is the best option as it can be used in my script. But after retrieving data it turns out ...
0
votes
1
answer
97
views
How can I log in to a scratch org directly with the sf CLI (no DevHub)
I have a user account in a scratch org and I need to log in to it via the sf CLI so I can deploy some resources.
For some reasons which are hopefully temporary, I do not have an account in the DevHub ...
0
votes
1
answer
858
views
Unable to load schema from \vscode\**\node_modules\@salesforce in Visual Studio
After installing Visual studio, I downloaded Salesforce Cli for Windows.
I can see in C:\Program Files\sf\client\node_modules
Also in C:\Users***\vscode\extensions I can see
-> There are not all ...
1
vote
0
answers
92
views
Deploy Profiles without changing related objects, fields, etc
I'm working on a tool for cleaning up and refactoring profiles and permission sets. This tool uses the Salesforce CLI (sf project retrieve start) to retrieve a wide array of metadata (including ...
1
vote
1
answer
148
views
SF CLI data import tree: Maximum call stack size exceeded
I've been using the data import tree CLI command for quite some time to import parent-child data after deployments. My current dataset includes 666 parent and 4,621 child items in JSON files, totaling ...
0
votes
0
answers
239
views
"We couldn't retrieve or load the information on the field" in retrieve call
I'm trying to retrieve a FlexiPage using the CLI called Contact_Record_Page_V2. We've been cleaning out some fields lately, and that page now seems to be corrupt. I assume it's trying to look for a ...
0
votes
1
answer
84
views
How to set up an authorization token in a pipeline (such as Azure DevOps, GitLab or GitHub actions)?
I'm struggling to get this to work. I need to store the authorization URL for the orgs in the pipeline tool's secret store, but I can't seem to figure how to use it properly in the script itself to ...
0
votes
0
answers
86
views
Cannot use @ or See Run tests in vscode for Salesforce DX
I'm not able to see the Run All Test | Run Test action in vscode on a test class or test method. Also I'm not able to use the @ to find methods definitions/variable declarations. I tried these:
...
1
vote
2
answers
430
views
Unable to install local development server
I am unable to install the local development server
Tried out this command in the CLI
sfdx plugins:install @salesforce/lwc-dev-server
In the VS code I am getting the following error:
Error: C:\...
0
votes
1
answer
79
views
Scratch org creation error- JwtGrantError
I'm getting below error while creating Salesforce scratch org-
Scratch org creation failed:
{
"status": 1,
"name": "JwtGrantError",
"message": &...
0
votes
0
answers
84
views
Jenkins - SF cli cannot seem to access SF_ACCESS_TOKEN in the environment
I am using sf org login access-token --instance-url https://myorg.my.salesforce.com --no-prompt to login to a Salesforce Org. On Jenkins, I am setting the SF_ACCESS_TOKEN environment variable. However,...
0
votes
0
answers
34
views
Variable does'nt exist error while pushing the source code to the scratch org
I have tried to push the source code to my scratch org using this command sfdx force:source:push
I'm getting component failures and deployment is getting failed below are the errors
Variable doesn't ...
2
votes
2
answers
2k
views
Error after installing Salesforce CLI
Something is not working after I have installed the Salesforce CLI. When I query sfdx update in PowerShell I get this error:
Error [ERR_REQUIRE_ESM]: require() of ES Module C:\Program Files\sf\client\...
0
votes
1
answer
71
views
Error when installing salesforce code scanner
I am trying to install salesforce code scanner with
sf plugins install @salesforce/sfdx-scanner but I am getting an error:
NpmError: Failed to find @salesforce/sfdx-scanner@latest in the registry
sf ...
1
vote
0
answers
126
views
Avast Antivirus blocks Salesforce CLI when authorizing an org
My antivirus, avast, blocks my Salesforce CLI when I'm trying to authorize a new org.
It gives me this error message:
We've blocked powershell.exe because it was infected with IDP.HELU.PSE41 - Command ...
1
vote
1
answer
193
views
Is there a sf command to list all apex classes in my Org?
I want to use an sf command to list all the names of the apex classes I have in my Org.Is there a command I can use ?
-1
votes
1
answer
118
views
Create metadata Container with sfdx command
Is it possible to create a Metadata Container using sfdx command ?
then to create an apex class and deploy the metadataContainer to my Salesforce Org
I want to update an apex class that i have in my ...
0
votes
1
answer
299
views
Unable to deploy due to Payload Error Invalid version specified on package.xml
I'm unable to deploy a simple LWC from a trailhead. (I'm copy/pasting the example code, couldn't get to the hands-on challenge)
A list of things that I already tried:
Changed the version on the ...
1
vote
0
answers
44
views
2GP dependent package creation fails with dependency error [duplicate]
We have a 2GP devhub in which we are trying to create packages.
Our main package has a released version, and this main package is a dependency for our other package in the same namespace.
{
"...
0
votes
0
answers
53
views
"release": "previous" 61.0 ERROR: Warning: (1) Unable to parse package2-descriptor.json: invalid attribute 'subscriberPackageId' at line 1, column 565
I am creating a multi dependant 2nd Gen Package, the project creation seems to be using salesforces most recent version, 61.0. Although, I need it to be the previous version, 60.0. So in my project-...
0
votes
1
answer
68
views
Unable to export test run result with GitHub Actions
My goal is to use GHA to export JSON with APEX Test Coverage and sent it to SonarQube for calculation.
I have set up one workflow, that initiates Test Run using SF CLI and now I am writing another ...
0
votes
1
answer
64
views
Getting error "Unable to parse package2-descriptor.json: invalid attribute 'subscriberPackageId" using "release":"previous" in current preview window
I'm encountering an error today (2024-06-10) that I think I need Salesforce's assistance with.
I am trying to create a new beta package using sf-cli 2gp package creation.
Today when I create a package,...
0
votes
0
answers
89
views
Lightning component warning/error in flexipage
As i need one component(button) to be displayed in the record page, but receiving the following error/warning in Lightning page:
"this related list cannot be displayed because its not in the ...
3
votes
1
answer
603
views
UNSUPPORTED_API_VERSION: Invalid Api version specified on URL on Manifest Retrieval
After refreshing a sandbox last night, I was unable to retrieve metadata from the org using SFDX in VSCode due to a mismatch in API Versions. The error received was:
15:51:26.514 Starting SFDX: ...
0
votes
0
answers
31
views
Find out when an unmanaged package was installed in Production
When using this command:
sf package version list --released --verbose --json
output:
{
"Package2Id": "12345somestring",
"Branch": null,
"Tag&...
0
votes
1
answer
186
views
Bulk Update Custom Metadata Records
Are there any sfdx/sf CLI commands to bulk update the Custom Metadata Records via VS Code?
I can able to see only create commands in the Salesforce documentations.
Thanks In Advance!!
1
vote
0
answers
293
views
How to use custom labels in LWC that is used in standalone LWR SPA NodeJS module?
I am trying to create LWR SPA project that consisted by LWCs.
I have created new LWR SPA with command : "npm init lwr@latest"
The steps was
set project name - lwr-project.
Select Type - ...
0
votes
0
answers
28
views
Uninstalling a Package
I have a package installed in my Salesforce org. I also noticed growing numbers of SOQL queries. I would like to know if removing the package would affect any existing records and is there a way to ...
1
vote
0
answers
136
views
Getting Error "(1): The requested resource does not exist" while creating sandbox through Salesforce CLI
Getting Error "(1): The requested resource does not exist" while creating sandbox through Salesforce CLI
sfdx org create sandbox -f config/dev-sandbox-def.json --target-org DevHubOr --wait ...
2
votes
1
answer
75
views
Import Sandbox with Test Data for non developers
The use case here is that we want to import sandbox with test data having parent child relationship in a single go. One way to do it would be to use sf commands -
sf data import tree --plan Account-...
1
vote
1
answer
77
views
What is the way to set LWC (Lightning debug mode) with an 'sf cli' command for the admin User if it exists?
Use case:
I want to assign to the admin user of my newly created scratch org the 'Debug Mode' so that when I open my new scratch to be able to directly start debugging my LWC components. Is that ...
0
votes
0
answers
177
views
Data category visibility on PermissionSet
Is there a way to programatically fetch or deploy the Data Category Group Visiblities on PermissionSet via the metadata api?
I see in this documentation that PermissionSetCategoryGroupVisibility isnt ...