Skip to main content
16 votes
Accepted

Export SOQL CLI Results to CSV

There is --resultformat on query. sfdx force:data:soql:query -q "SELECT Id,Name,Status__c FROM Property__c" --resultformat csv` I got that from the command help. See below. -> sfdx force:data:...
Amphro's user avatar
  • 603
9 votes
Accepted

Is this possible to install SFDX CLI on Heroku instance?

Yes, the DX CLI can run on Heroku. Wade Wegner contributed this buildpack here: https://github.com/heroku/salesforce-cli-buildpack EDITED: added some extra details on how to install it since the ...
POZ's user avatar
  • 4,409
8 votes
Accepted

Why promoted unlocked package is still not available to install in production?

Looks like promote commands reports success status before the package gets actually promoted, so ISV should wait some time up to an hour to wait until the package gets actually promoted
Patlatus's user avatar
  • 17.2k
7 votes

Export SOQL CLI Results to CSV

You're right that you cannot output to to CSV, but every command on the Salesforce DX command line has a JSON output option by using the --json option or setting a parameter to make DX default to JSON ...
pchittum's user avatar
  • 19.7k
7 votes

Visual Studio Setup with Salesforce CLI for M1 Mac

The error message you got is helpful here, and tells you what to do. There was recently (October 22, 2020, CLI 7.77.1+, according to the release notes) a change made to the CLI to reorganize some ...
Derek F's user avatar
  • 62.4k
7 votes
Accepted

How do I create a managed package with SFDX?

Ok, looks like I have to create Developer Edition org and register a namespace there and then link it to my Dev Hub org due to documentation https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev....
Patlatus's user avatar
  • 17.2k
7 votes

This org appears to have a problem with its OAuth configuration. Reason: invalid_grant - audience is invalid

Run the following command first export SFDX_AUDIENCE_URL=https://test.salesforce.com Then run sfdx force:auth:jwt:grant --clientid <myclientid> --jwtkeyfile server.key --instanceurl https://...
Praveen Tata's user avatar
5 votes
Accepted

Unable to delete custom field using force:source:delete CLI command

I believe this is a bug in the CLI plugin for windows that you might want to report to salesforce CLI team by creating a case or via twitter. However there is a simple workaround for it using mdapi ...
Mohith Shrivastava's user avatar
4 votes

sfdx: command not found - Salesforce DX

Adding to Steve's answer, the complete process on Windows is to: Search for 'Advanced system settings' and click on 'Environment Variables' Under 'System variables' click on Path Press edit then 'New'...
Gamma032's user avatar
  • 141
4 votes

Force cli query returns random column sequence

This is a known issue as of now (acknowledged by Dave Carroll from Salesforce). I also see your comment on this thread. The workaround suggested to dump the output into CSV/ JSON and use external tool ...
Gaurav Kheterpal's user avatar
2 votes

Installing Dave Carolls Sublime Lightning - windows

It requires force-cli which leads me to believe you have to have the force-cli be executable in your environment's path variable. You can test if Sublime is able to reach the force-cli by opening a ...
drakored's user avatar
  • 2,708
2 votes

How to remove scratch org details from metadata

The only way I can think of to do this is to build a package.xml using version 39.0 (?) or lower (so that you don't get all the profile metadata), and explicitly specify which object/fields you want ...
sfdcfox's user avatar
  • 495k
2 votes

format in the Force.com CLI

I find it helpful to have the SOQL in a text file, and then use ` and cat to inject it into the command: force query "`cat mysoql.txt`" --format:csv >myresults.csv
PaulM's user avatar
  • 81
2 votes

sfdx: command not found - Salesforce DX

Here's the link for download SFDX: https://developer.salesforce.com/tools/sfdxcli
Peter Tempfli's user avatar
2 votes
Accepted

CLI Data Loader Failure notification

When running data loader from the command line you are running an app that is using the Salesforce API to write data to Salesforce. If you want email notification on failures, the way to do that ...
pchittum's user avatar
  • 19.7k
2 votes
Accepted

Can I use 'force-cli import' as a destructive act, to purge unwanted files?

If in doubt, go to the source - import.go. As it stands now this command won't be smart enough to diff what you have locally with what is currently in Salesforce a perform the required destructive ...
Daniel Ballinger's user avatar
2 votes
Accepted

the path specified is not a directory or doesn't contain a package.xml

This error means that either the mdapipackage folder you're referencing in your command does not exist or that it does exist and it does not include a package.xml file. From your command history it ...
John Towers's user avatar
  • 3,873
2 votes

Is it possible to use system.runas with the force cli?

System.runAs only runs in actual unit tests. Execute Anonymous is not a unit test context; any changes you make in Execute Anonymous successfully will save. If you want to run tests, you need to do a ...
sfdcfox's user avatar
  • 495k
2 votes

Avoid strange error 'The "path" argument must be of type string. Received null', when fthe path is not null

Looks like the culprit was invalid folder structure, when I copied fields, by accident I copied the fields folder only, while intended was objects/Product2/fields The wrong folder structure which was ...
Patlatus's user avatar
  • 17.2k
2 votes

When running sfdx force:apex:test:run we get the error "Your request exceeded the time limit for processing. connection was cancelled here"

Yes, we've had this problem in our packages. It happens when too many large unit tests try to run at once. The primary solution is to set @isTest(isParallel=false) to all of your test classes. This ...
sfdcfox's user avatar
  • 495k
1 vote

Is it possible to use system.runas with the force cli?

Based on its documentation, the force apex command executes Anonymous Apex, not an Apex unit test. The runAs() construct, along with Test.startTest() and Test.stopTest(), is available only in the ...
David Reed's user avatar
  • 93.2k
1 vote

DX - List of Bundle/Prefix types?

You can use any of the types in the Metadata Types documentation. There is mostly a 1:1 relationship to those metadata types for the force:source:retrieve command. Settings are kind of an exception (e....
sfdcfox's user avatar
  • 495k
1 vote
Accepted

Duplicate variable error when pushing code using CLI into scratch org

You've copied-pasted something incorrect or such. You are not allowed to have a variable shadow another variable this way. Here's a non-compiling script that demonstrates this: public class q246196 { ...
sfdcfox's user avatar
  • 495k
1 vote
Accepted

Salesforce CLI tools do not work together with Git Bash on Windows

So, after renaming the folder into "C:\Tools\SalesforceCLI\bin" and modifying a path environment variable I was able to resolve the issue.
Patlatus's user avatar
  • 17.2k
1 vote

SFDX: Profile changes not being recognized on Source:Pull

By my observation, the Standard Tab Settings of the Profile are not pulled. However I found this discussion that explains a way to manually add tabVisibilities elements to the .profile-meta.xml ...
Dan Puza's user avatar
  • 391
1 vote

sfdx: command not found - Salesforce DX

Environment Variables in Windows has two sections, one for the User and one for the System. In my case, the Salesforce CLI tools was installed using an Administrator account and the installer had ...
Steve's user avatar
  • 11
1 vote

sfdx: command not found - Salesforce DX

I assume you have installed SFDX from the link provided by Peter. If the problem still comes then it could be because you've forgotten to add the Path to System Environment Variable. If not, copy the ...
Kamal Thakur's user avatar
1 vote
Accepted

Installing Dave Carolls Sublime Lightning - windows

The bottom line of the dialog also hints at this. They seem to suggest moving the force cli app directly into sublime's default path. I believe sublime reads the system path, so changing the Windows ...
naruto-sfdc's user avatar
1 vote
Accepted

Having issue with Data Loader CLI

There is no error. The upload should work fine. You are getting the warning because the mapping for customObject__c ( which would be an optional field) hasn't been provided.
force007's user avatar
  • 551
1 vote
Accepted

How to configure update operation in Command-line interface for Force.com

You don't need to specify key="sfdc.Id". If you have extracted *.csv with opportunities and have configured mapping *.sdl update operation should work. opportunityUpdateMap.sdl: NAME=Name ID=Id ...
Ilya Lepesh's user avatar
  • 4,125

Only top scored, non community-wiki answers of a minimum length are eligible