Questions tagged [salesforcedx-cli]

Questions relating to the `sfdx` binary that is supplied as part of the tools suite for Salesforce DX.

Filter by
Sorted by
Tagged with
43
votes
4answers
16k views

Removing old hub org, or non-scratch org from Salesforce DX org list

In the Salesforce DX pilot, every pilot participant was given a temporary dev hub org. These orgs expired, were destroyed, and sent back to the matrix in advance of the open beta. I had an existing ...
24
votes
2answers
5k views

SFDX Pull fails because of AppMenu/AppSwitcher

I created a scratch org with the new Winter release. After pushing my code without trouble, and updated it, I wanted to pull it to local files using : sfdx force:source:pull --forceoverwrite -u ...
23
votes
1answer
6k views

SalesforceDX CLI “sObject type 'SourceMember' is not supported” with source pull

I'm trying to pull down the current source for a sandbox org I've just connected to. General steps were: Connect to the org. sfdx force:auth:web:login -r https://test.salesforce.com -a someOrg Create ...
21
votes
1answer
9k views

Salesforce DX - how to set default devhub if I missed the -d option when connecting to devhub

If I missed the -d option when using sfdx force:auth:web:login, is there a way to reset it as default devhub afterwards? I searched through the document but didn't see any.
19
votes
6answers
7k views

SFDX: Grant type not supported

I'm trying to log in to an existing sandbox using the sfdx force:auth:web:login, which takes me to the login screen, I enter the password and email and I allow access, however in the browser I get a ...
18
votes
1answer
3k views

How do we force DX to push items that it doesn't think are updated?

I'm building a DX project now, and every time I try to push some fields, force:source:push fails to recognize that the fields are an addition. I've tried deleting the source files, pushing, and then ...
17
votes
2answers
10k views

How to run Apex anonymous code from Visual Studio Code

Is it possible / How would I run a block of Apex anonymous code from Visual Studio Code?
17
votes
3answers
5k views

SFDX 6.21.0-9db990b3c9 AND CURRENT Update - Error - sfdx no longer works

Anyone on a MAC got this update to work? Anyone know how to fix? It hangs for me on finishing up. Now all I get when executing sfdx at the cli is: module.js:540 throw err; ^ Error: Cannot ...
16
votes
3answers
14k views

How to push code to production with Visual Studio Code & DX

I am using Visual Studio Code to develop new functionality. However, after completing the testing in the sandbox, I want to push the code to production. When I choose "SFDX: Deploy Code to org", it ...
16
votes
2answers
4k views

How to use “sfdx force:source:pull” with folders other than “main/default” where components are added in the scratch org?

I've setup the folder structure for a new project following the pattern identified in sfdx-isv/sfdx-falcon-template. Also see this question Two SFDX project folder structure questions for some ...
16
votes
1answer
1k views

SFDX: ERROR: INVALID_OPERATION: rollbackOnError option must be true on a production org. When using Salesforce DX pre-release and Visual Studio Code

I have a Visual Studio Code project which has beed authorised against a production environment. I am using the Salesforce DX CLI pre-release: sfdx plugins:install salesforcedx@pre-release When I ...
14
votes
2answers
3k views

SFDX Force:org:open fails and user is directed to the login screen

I have two scratch orgs that I've created this week, post Winter Release, that will not open from the command line using sfdx force:org:open. The login fails and I'm stuck staring at the login screen....
13
votes
2answers
6k views

How do I get Apex code coverage statistics when using Salesforce DX & Visual Studio Code

I am using Salesforce DX & Visual Studio Code to develop against a sandbox environment. After running an Apex test from Visual Studio Code, how can I view the code coverage from within Visual ...
12
votes
1answer
1k views

Salesforce DX multiple computers connected to same Scratch Org

I am having a bit of trouble conceptualizing how Salesforce DX works. I just received a new computer for work and I set up the sfdx-cli and everything to get going. In my Git repo, I have all my ...
11
votes
3answers
4k views

How to install managed package using Salesforce DX CLI?

I am trying to follow the Trailhead module on CI and Salesforce DX. I tried to push some of my Lightning components which depend on a managed package in App Exchange. I would like to know how to ...
11
votes
4answers
3k views

Can .forceignore be used to not pull profiles that only exist in the scratch org?

I have an SFDX format project that contains some components but I do not want any profiles to be present. When I do a: sfdx force:source:status to see what files would transferred by a sfdx force:...
11
votes
4answers
14k views

No Option for “SFDX:Authorize an Org” command in VS Code Command Palette

I have performed below steps- Install CLI Install extensions "Salesforce Extension Pack" and "Saleforce CLI Itegration" I am getting only few SFDX command options in Command Palette. Also i have ...
10
votes
2answers
2k views

SalesforceDX Stopped working

Went to try and use SFDX tonight (it was working a few days ago) and received the following Plugin "salesforcedx" v41 or later may only be installed in a v6.0.0 or later CLI. 41.3.0 I tried ...
10
votes
4answers
5k views

How to open a scratch org created in another machine

I have created a scratch org on my home machine and it is active and can be seen in the devhub. And I am now on my office computer. However, when I use sfdx force:org:list I can't see that ...
10
votes
2answers
882 views

How to remove a Package from my DevHub org?

I have created an Unlocked Package in my DevHub using force:package:create and installed it in a scratch org for testing. Now I can't seem to find a way to remove it. I really don't want it showing up ...
10
votes
0answers
318 views

Scratch orgs and Critical Updates

I notice that all the scratch orgs I've been creating starting in Spring '18 open up with a reminder to Enable the New URL Format for Lightning Experience and the Salesforce Mobile App. Another update ...
9
votes
3answers
3k views

Can I use SalesforceDX to load data into sandboxes?

Can I use Salesforce DX and the Salesforce CLI to load data (from CSV or JSON files) into sandboxes (not scratch orgs)?
9
votes
1answer
7k views

sfdx Deploy to existing salesforce instance?

I am new to salesforce development and have been reading the manual, but I am kind of stuck. I have pulled and converted the metadata api source from the scratch org, but now I am wanting to deploy ...
9
votes
2answers
3k views

SalesforceDX: Log in to sandbox by username/password from command line without browser involved

Is it possible to log in from sfdx CLI to already existent sandbox having username/password combination? Reading through documentation I see bunch of ways how to authorize - through browser, by ...
9
votes
3answers
5k views

How can I fix sfdx error: “The \”path\“ argument must be of type string. Received type undefined”

I'm getting an error similar to this post and I've checked to see if I could resolve it in the same way, but it appears to be a different issue. Whenever I try to push, deploy or convert to metadata, ...
9
votes
2answers
3k views

sfdx - is it possible to pull or push one file instead of all the files

In Salesforce DX, I read through the document but it seems to me I can only use sfdx:force:source:push or pull to push or pull all the files. Or use .forceignore to ignore some files. However, is ...
9
votes
1answer
794 views

How to specify a managed package key in a sfdx-project.json dependencies entry?

It seems like it should be simple, but I have googled this and failed. I'm writing a project using Packaging 2 in sfdx, and it depends on an old managed package. I've installed that package into my ...
8
votes
1answer
256 views

“Cannot set property color of #<CLI> which has only a getter” when running sfdx commands

I'm getting the following error when running any sfdx command with the latest version of the Salesforce CLI on macOS High Sierra: Cannot set property color of #<CLI> which has only a getter I'...
8
votes
1answer
585 views

How do I reset the SFDX CLI Runtime Global Configuration Values?

I had sometime back set the apiVersion CLI Runtime Configuration value globally for all projects to version 45.0 when I signed up for Spring '19 preview sandbox, using the command: sfdx force:config:...
8
votes
3answers
1k views

Migrating to Salesforce DX

We are looking to move and migrate to Salesforce DX, and I've been playing around with the cli / tools and following the steps provided in the developer guide. We have a few managed packages, along ...
8
votes
1answer
4k views

How to switch between Salesforce DX orgs/projects when using Visual Studio Code

BACKGROUND Imagine you're working on 2-3 Salesforce projects each with a different target Orgs (sandboxes for different companies). You're actively working on project 1 (coding, running tests, ...
8
votes
2answers
421 views

Scratch org is created without Alias and reports “Cannot read property 'timeout' of undefined.”

From one day to the other I am unable to create scratch orgs using the command which worked before: sfdx force:org:create -f /Users/path/to/scratch-def.json -a MY_ORG -v DevHub -s -d 30 I receive ...
8
votes
3answers
974 views

Can I connect to a sandbox using JWT Flow and Prod connect app?

I'm trying to connect to a sandbox using the sfdx cli and the JWT flow through force:auth:jwt:grant. According to this Salesforce DX doc, we can use the same connected app information from Production ...
8
votes
1answer
410 views

Scratch org was created with entitlements enabled, but pulling the source results in entity not found?

I created a scratch org with the following definition file: { "orgName": "Company, Inc", "edition": "Enterprise", "features": ["PersonAccounts", "ServiceCloud"], "settings": { "...
8
votes
2answers
948 views

“UNKNOWN_EXCEPTION” when trying to deploy Permission Set

I'm trying to deploy an app to a packaging (Developer Edition) org. I successfully pulled the source from a scratch org and successfully converted the source using force:source:convert. I run the ...
8
votes
0answers
4k views

SFDX Deploy: Global Value Set Cannot Be Resolved

I am trying to use DX to deploy to a sandbox. It has been a major hassle. At this point the only error I get is this: Global value set 'External_Evaluation_Required__c' in record type 'Exception' ...
7
votes
2answers
1k views

Unlocked packages vs Unmanaged packages

What's the main differences between unlocked & unmanaged packages?
7
votes
2answers
3k views

Export SOQL CLI Results to CSV

I've got a automated Cron-like job that exports some data from Salesforce on a regular basis. The goal is to regularly export SFDC data to csv or tsv. I'm using the sfdx tool to perform this query - ...
7
votes
2answers
822 views

ERROR running force:source:pull: Entity of type 'Workflow' named 'Workflow' cannot be found

I am having issues when pulling Workflows using SFDX with VS Code. The error that I get when pulling in the Workflow (sfdx force:source:pull) is: ERROR running force:source:pull: Entity of type '...
7
votes
2answers
6k views

Salesforce DX: Unexpected file found in package …/package.xml

For Salesforce DX, after downloading code from an Unmanaged Package to push to a Scratch Org, when I try to convert the unzipped package I am getting an error saying that Unexpected file found in ...
7
votes
3answers
938 views

Is the source code for the sfdx tools available?

Related to this question How to handle the change to "Salesforce DX project format" and keep the revision history?, being able to see the source code for e.g.: sfdx force:mdapi:convert --...
7
votes
4answers
1k views

Pulling Data from Scratch Org Salesforce DX

Recently started using Salesforce DX. Got a scratch org spun up and pushed some source to it. However I needed to create a new trigger, which I couldn't find a CLI command to do. So I instead created ...
7
votes
2answers
521 views

sfdx force:lightning:lint throwing a Parsing Error with ES6 syntax

I'm running the SFDX lightning linter on a lightning component as part of a pull request for my organization, but am hitting the following error: error Parsing error: Unexpected token > Line:57:...
7
votes
1answer
3k views

SFDX: Deploy Source to Org: Very slow

I am using command: SFDX: Deploy Source to Org To deploy Apex code to a sandbox environment. But often it is taking a very long time (multiple minutes) to respond/complete. QUESTION How can I get ...
7
votes
1answer
294 views

Is this possible to rename a field using Tooling API or Ant Migration Tool or SFDX CLI?

I have tried to run renameMetadata call from Ant Migration Tool <target name="1. Rename field on Sandbox"> <sf:renameMetadata username="${sf.Sandbox.username}" password="${...
7
votes
1answer
383 views

mdapi convert command fails when source has lightning web component bundle

With the latest CLI (sfdx-cli/6.52.2-c6cdc99881 (darwin-x64) node-v8.9.4) i have observed that the mdapi:source convert fails when the package has the lwc bundle . The salesforcedx plugin version is ...
7
votes
1answer
1k views

Profile Field Level Security missing in XML when retrieve profile changes from scratch org

In our DX project we maintain 4 profiles (3 custom and the System Administrator profile). When a scratch org is created I can push the project and everything deploys correctly including the profiles ...
7
votes
1answer
1k views

.forceignore isn't detecting the files

After playing a bit with Salesforce DX, pushing and pulling stuff, I decided to try out the .forceignore file, but I can't seem to make it work. At the moment I have the following structure: and my ....
7
votes
1answer
1k views

SFDX mdapi convert does not generate necessary object-meta.xml

I have a simple package that I pulled down from my production org that I am now looking to push:source to a scratch org. The issue is that when I run sfdx force:mdapi:convert -r test/unpackaged I ...
6
votes
3answers
23k views

sfdx is not recognized as an internal or external command

I am trying to learn about Salesforce DX (Developer Experience). For most of the salesforce DX tasks, we require using salesforce command line interface such as authorization, creating scratch org. ...

1
2 3 4 5
10