Questions tagged [cli]
The cli tag has no usage guidance.
119
questions
0
votes
2
answers
58
views
Stop deployment to Production from Visual Studio Code
We have a tricky situation at our company and can't figure out a solution, maybe someone could help.
For support and investigation purposes, we need to give certain developers the permission to:
...
0
votes
0
answers
43
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
45
views
Retrieving bulk query results from sf cli
I am using @salesforce/cli/2.50.6 win32-x64 node-v20.15.0
I am trying to extract data using a bulk query. This is a significant amount of data in this query request:
C:\Users\{user}\Desktop>sf data ...
1
vote
0
answers
56
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
0
answers
40
views
how to delete null line in batch script from csv files
I had a problem with my csv files input, because some of csv type is not processed because process runner is NPE to automate insert with dataloader CLI. Can you have a solution with this problem?
This ...
0
votes
0
answers
38
views
I get an error when installing B2B Store via b2b-commerce-on-lightning-quickstart on the convert-examples-to-sfdx.sh step
I am following the instructions on this repo readme: [b2b-commerce-on-lightning-quickstart][1]
And I have problem running the script "convert-examples-to-sfdx.sh". The erros is:
/c/Program ...
2
votes
0
answers
128
views
Retrieve/deploy metadata for PermissionSet works but changes don't reflect in Setup / Permission Sets
I need to make changes to unpackaged Permission Sets in several Salesforce orgs. My plan was to retrieve a specific Permission Set via the Salesforce CLI, modify it, then deploy it...
sf project ...
1
vote
0
answers
51
views
Is there a way to retrieve translation for only one field?
We can retrieve object translation using
sf project retrieve start -m "CustomObjectTranslation:Custom_Object__c-de"
But what if I want to retrieve translation only for particular fields, ...
1
vote
0
answers
113
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 ...
4
votes
0
answers
30
views
Typescript and stubbing/ mocking a cli extension
I'm working on a SF cli extension. As recommended, it's written in typescript. I'm writing unit tests.
I'm early on the learning curve for typescript and cli extensions for SF. I've been trying to ...
1
vote
2
answers
41
views
Anyone know if Salesforce CLI configuration files are portable?
I'm still using the sfdx CLI, haven't upgraded to the sf one yet but maybe it's the same for both.
I see in my home directory a folder .sfdx that contains json files including one for each org I've ...
2
votes
1
answer
111
views
Is it possible to stop/clear/refresh the source tracking for a single file?
In scratch and Dev I have different Admin.profile field values and that is kind a catch 22.
For some reason I have changed the Admin.profile in the scratch and now it is retrieved each time I do sf ...
1
vote
1
answer
48
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
1
answer
49
views
Migration from ANT to Salesforce CLI v2 - Script
Ant gave the possibility of creating a build.xml file which, by calling single operation, performed certain operations, for example:
<target name="retrieveFromDEV">
<sf:retrieve ...
0
votes
2
answers
366
views
Is it possible to deploy by filename using the new CLI?
I have been using a command from the old CLI: sfdx force:source:deploy -p "/path/to/filename.cls" to deploy by filename.
Is this possible using the new CLI?
I do see an example of sf project ...
2
votes
2
answers
225
views
Is there a CLI command to find all Test classes associated with a certain Apex class?
As the CLI runs tests before deploying an Apex Class, it has to know which tests are associated with a certain Apex class.
Is there a way to retrieve a list of test classes that are associated with a ...
3
votes
1
answer
366
views
sf project deploy preview shows conflicts, but files are identical
When I run sf project deploy preview it shows particular files as conflicted. However, when I run SFDX: Diff File Against Org, it shows as identical.
What does it mean to have a conflict when ...
0
votes
1
answer
786
views
Can I retrieve project files from production using the sf CLI?
When I run sf project retrieve start on a production Org, it says:
Error (1): This command can only be used on orgs that have source tracking enabled, such as sandboxes and scratch orgs
Is there a ...
-1
votes
1
answer
51
views
How to retrieve last modification time of files stored in Org?
Currently I am using sf project retrieve start to retrieve files stored inside the Salesforce Org.
Is it possible to retrieve the file modification times of these files as well? I am working on a tool ...
0
votes
1
answer
46
views
Data command missing in sf CLI [duplicate]
I am not able see "data" in sf command CLI
Can you help me why I am not able to see
2
votes
0
answers
145
views
Add SF CLI to GitHub Actions Cache
I'm trying to cache sf cli in GitHub Actions but I get sf: command not found when the cache is restored. Does anyone know which other paths I need to add to the cache?
- name: Cache
id: cache
uses:...
2
votes
1
answer
1k
views
SF Package Install Warn - @salesforce/plugin-packaging different from the version specific by sf - Type Error - this.config.plugins.filter is not a fn
I am running into an issue/error when I am trying to run the sf package install command
I am using the latest @salesforce/cli which is currently 2.20.6 (even tried latest nightly 2.22.1)
https://www....
0
votes
1
answer
91
views
Method is available in sandbox but not in prod
I've composed an apex classes in sanbox, test classes as well. It works fine in sandbox. Now i wanna deploy to prod without using changesets and packages.
a part of apex
@testVisible
protected ...
1
vote
1
answer
2k
views
VS Code CLI Retrieve taking too long to respond/complete
For several years I have been using the SF CLI retrieve commands in VS Code to retrieve data from my Partial Copy Sandboxes to my local git repo.
About a month ago I moved from using the force:source:...
0
votes
1
answer
426
views
Unable to run sf package commands after MacOS upgrade to Sonoma
No sure if it's local config or OS upgrade but my sf cli commands have been broken especially the packaging commands.
When I run below command I get an error related to JIT plugin (I am assuming JIT ...
1
vote
1
answer
135
views
"connectedStatus" in `sf org list` command contains HTML page markup
I ran sf org list command in console and saw CLI just dump a ton of invisible symbols, making terminal unusable. I then tried json output and saw that for scratch orgs I got a huge output with HTML ...
0
votes
1
answer
91
views
Cannot deploy project due to missing type
I am currently trying to deploy my project, but are getting some errors which I am unsure how I should navigate.
Error WebCart
Invalid fullName, must end in a custom suffix (e.g. __c)
It is ...
0
votes
1
answer
158
views
Cant downgrade SFDX to previous version 7.181.1 for scratch org script created by team
I need to downgrade to this version(7.181.1) as the whole team uses it for a scratch org script. I've tried using the most previous one I can find 7.199.2 and the most recent 7.209.6.
Either one will ...
2
votes
0
answers
301
views
Enabling feed tracking when creating scratch org not possible?
So, currently, there is no way to enable feed tracking for a standard object, during scratch org creation. This includes all settings in scratch org definition file and/or using an org shape.
The ...
-1
votes
1
answer
2k
views
Salesforce Org Autorize Error
Hi guys I have a problem with authorize to my Sandbox, I used this command to authorize "login --setalias "MyOrg" --instanceurl "MyOrgUrl" --setdefaultusername" and ...
0
votes
1
answer
7k
views
SFDX: Authorize an Org failed to run
11:55:18.338 sfdx force:auth:web:login --setalias vscodeOrg --instanceurl https://login.salesforce.com --setdefaultusername
(node:8748) Warning: Deprecated environment variable: SFDX_JSON_TO_STDOUT. ...
-1
votes
1
answer
2k
views
sf command is not installed on linux
H, I have followed instructions on this site to install sfdx on linux, which is working fine
https://developer.salesforce.com/docs/atlas.en-us.242.0.sfdx_setup.meta/sfdx_setup/sfdx_setup_install_cli....
0
votes
1
answer
245
views
How to include custom metadata records when building a release artifact with the salesforce CLI
Im trying to generate a release artifact by converting some source files to metadata format so I can deploy it with the following command:
sfdx force:mdapi:deploy...
this is the command I'm using for ...
-1
votes
1
answer
53
views
How to get information which tests are required for specified scope
our deployment pipeline works on diff. So every time only differences between source and target branch are deployed to environment. We are wondering if there is possibility to run only required tests ...
0
votes
1
answer
569
views
Salesforce CLI - How to disable warnings?
Since the last Salesforce CLI Update 7.193.2 I've been seeing this warnings in the "Problems" tab in Visual Studio Code.
Does anyone know how to disable them?
It makes my code unreadable, ...
0
votes
1
answer
191
views
How to delete Source from Org that is deployed accidentally?
Requirement:
I have installed FFLib ApexMocks Framework(https://github.com/apex-enterprise-patterns/fflib-apex-mocks) and FFLib Apex Common(https://github.com/apex-enterprise-patterns/fflib-apex-...
1
vote
0
answers
375
views
Mass Insert Custom Metadata Type Records
I'm using Salesforce CLI to import 5000 records of a custom metadata but I wasn't able to to import Label and DeveloperName together and I saw that is a limitation, so I tried utilize only Name but in ...
0
votes
1
answer
262
views
Is there a way to promote a managed package from the CLI?
If I created a managed packaged (Beta) in a developer environment is there a way to promote this package to an Alpha?
Use Case:
We are experimenting with Package Extensions. However, if order to ...
0
votes
0
answers
738
views
Salesforce CLI is not retrieving permission set metadata
I am trying to retrieve metadata from a sandbox instance to prepare a deployment. Flows, Custom Objects, etc. are getting retrieved, but permission sets are not.
In my package.xml file, I tried the ...
0
votes
1
answer
450
views
How can I logout from all the unused sandboxes I have in my machine?
Or rather how to remove the orgs I don't use anymore. Is there an easy way to "remove all orgs unused for 90+ days"?
1
vote
2
answers
176
views
Adding Recipe to Analytics template fails with "CSV .. garbage collected"
Instead of packaging the data of my Analytics template as CSV files in the template I want to have a recipe create it from the orgs data. I there for tried to update my existing template (part of a ...
-2
votes
1
answer
2k
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 ...
0
votes
1
answer
501
views
Could not retrieve the username after successful auth code exchange. reason: unable to get local issuer certificate
When am trying to authenticate via VS CODE integrated cmd pallets, I get below error
Could not retrieve the username after successful auth code exchange.reason: unable to get local issuer certificate
...
0
votes
1
answer
99
views
How can I uninstall all packages from a particular org as quickly and simply as possible?
How can I clean my org and uninstall all packages from a particular org as quickly and simply as possible?
1
vote
1
answer
642
views
Connecting to Github Organization Account
Great news! Salesforce DevOps Center is Generally Available.
I am struggling to connect it to a repository owned by Organization.
DevOps Center guide says the following:
GitHub repos owned by an ...
0
votes
1
answer
169
views
Salesforce CLI Command to delete Unmanaged Package
We are doing some early spring cleanup and need to uninstall some managed and unmanaged packages. I can use the CLI command below to delete the Managed packages using the Namespace prefix.
sfdx force:...
2
votes
0
answers
775
views
SFDX Error: Selected Components Are Not Available
Recently, my colleagues started receiving error an error whenever attempting to retrieve or diff components, for production or any of our sandboxes.
]
I have recently joined the team, and I did not ...
2
votes
1
answer
219
views
Moving to Source-tracked development, can't pull __pc fields
I inherited an org that has person accounts enabled. (boo, hiss.)
The team is currently using sandboxes and org-based development. (boo, hiss.)
I was finally able to pull all? the metadata from ...
0
votes
2
answers
666
views
Strange error force:org:shape:list: Cannot read properties of undefined (reading 'length')
Strange error force:org:shape:list: Cannot read properties of undefined (reading 'length')
When I executed a command force:org:shape:list, I am obtaining a very strange misterious error: Cannot read ...
2
votes
4
answers
7k
views
Facing "Error: unable to get local issuer certificate Code: UNABLE_TO_GET_ISSUER_CERT_LOCALLY" when trying to update CLI. How to overcome this one
To set up SFDX , first I did install CLI and when I tried updating the same, I'm facing this issue. Can anyone please help me out.