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
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 ...
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 ...
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 ...
4
votes
1answer
648 views

VS Code Salesforce plugin deploy does not provide an error message

VS Code plugin for salesforce seems to be broken yesterday, It does not provide proper error message in case of failure. Tried this in a developer org as well as scratch org. Neither deploy code or ...
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 ...
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 ...
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 ...
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 ...
4
votes
1answer
4k views

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

Error while trying to authorize an org through JWT from SFDX CLI on Windows. sfdx force:auth:jwt:grant --clientid <myclientid> --jwtkeyfile server.key --instanceurl https://mysandbox.my....
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, ...
3
votes
1answer
552 views

Using DX Scratch Orgs to deploy code with legacy ant scripts

We are considering migration of our managed package development process to Salesforce DX. But we are definitely not ready yet to transform our code base and use full potential of SFDX, but still ...
2
votes
1answer
2k views

How do we create a scratch org with sandbox environment?

I am trying to achieve creation of a scratch org in the 30 days trail version of Dev hub account as shown below from Dream force 2017 Developer Keynote. . I got the below error! . Have anyone ...
2
votes
2answers
112 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
33 views

SFDX error for LiveChatTranscript object

I have added LiveChatTranscript object in my unlocked package but while versioning getting error LiveChatTranscript: Invalid fullName, must end in a custom suffix ( for ex. __c ) Can anyone help me ...
1
vote
1answer
3k views

ERROR running force:source:push: Push failed

I have been working on some classes using VS code and SFDX. I created a scratch org and pushed code to it using: sfdx force:source:push -u MY_ORG_ALIAS The push was successful. I continued ...
42
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 ...
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 ...
8
votes
3answers
965 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 ...
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 ...
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 ...
7
votes
2answers
1k views

Unlocked packages vs Unmanaged packages

What's the main differences between unlocked & unmanaged packages?
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)?
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 ...
5
votes
4answers
3k views

Salesforce DX Error Retrieving Admin Profile

When doing a sfdx force:source:pull command from my scratch org to collect my metadata changes made to Custom Labels, I get the following error: ERROR: Metadata API received improper input. Please ...
4
votes
2answers
3k views

Salesforce DX force:data:tree:export multiple queries

Playing with the export/import tree commands in the Salesforce DX beta. I've had luck exporting/importing parent/child records as demonstrated in the docs, but is it possible to use that command to ...
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 ...
5
votes
3answers
230 views

enable “Data Protection and Privacy” when creating scratch org

Is there any way how to automatically enable "Data Protection and Privacy" option during creation of scratch org (in definition file)? I didn't found any mention about this metadata in Metadata API ...
2
votes
1answer
58 views

Topics enabled for objects not getting deployed to packaging org

While trying to deploy TopicsForObjects in the packaging org I receive the following Error: Error metadata/package.xml package.xml You cannot install or upgrade a package that has a ...
2
votes
2answers
798 views

SFDX dependencies are not installed

I have a problem installing dependencies from sfdx-project.json. I created a Second Generation Package and generated a new version. I specified dependency as follows: "dependencies": [ { "...
2
votes
2answers
220 views

Setting Environment Variables in Salesforce DX?

I am looking to update SFDX_IMPROVED_CODE_COVERAGE Environment variable to true. Loosely documented here and here. I am using the syntax documented here that seems to show that I can update that ...
2
votes
2answers
2k views

Error on running SFDX CLI command

When I try to run a command -- (for example: sfdx update), I get the following message on the cmd prompt: Attempting to contact update site.. S3 host is not reachable.. Has anyone here come across ...
2
votes
1answer
1k views

Receiving Error: Entity of type 'flow' named 'xxxxxxxxxxxx' cannot be found when doing an sfdx force:source:pull command

I have made edits (Cloned/deleted old version) to a process builder in a scratch org and when I perform the sfdx force:source:pull command in GitBash I receive Error: "Entity of type 'flow' named '...
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 ...
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 ...
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. ...
6
votes
1answer
483 views

Moving from change set model to package development model

I am new to Salesforce and have few questions on the ways of developement and adoption of package model I have started working for a fairly large organization that uses Salesforce extensively and ...
4
votes
1answer
3k views

Scratch Org missing from Salesforce DX org list

I'm trying to set up a Heroku Pipeline for Salesforce DX as described in this example: https://github.com/wadewegner/salesforce-dx-pipeline-mdapi-sample. The process works fine up until a pull ...
3
votes
1answer
1k views

EAI_AGAIN errors when pushing or running unit tests in a newly created scratch org from Jenkins CI using SFDX

We sometimes get this error reported from a sfdx force:source:push of a largish code base: ERROR: Error: getaddrinfo EAI_AGAIN nosoftware-momentum-7459-dev-ed.cs9.my.salesforce.com:443 some six ...
3
votes
1answer
782 views

Code Coverage during sfdx force:mdapi:deploy

I am trying to do a sfdx force:mdapi:deploy to my production org. I am just migrating one class file, however when I do that I keep getting code coverage failures on custom classes that are already in ...
2
votes
1answer
120 views

How to add ignore managed package components in forceignore file?

How to ignore packaged components in forceignore file? I tried with below but not working. can you please look and suggest to me. **/*CloudingoAgent__* *CloudingoAgent__* package namespace start ...
2
votes
1answer
569 views

Issue to push static resource (single files and zip) using SFDX

have any of you faced issues to push static resources to scratch orgs using SFDX v46.8.0? Asking because I faced this issue and had to revert back salesforcedx plugin to 46.6.0. path\singleFile....
2
votes
2answers
520 views

salesforce DX installing managed package and status response in an automated environment

Requirement: A scratch org with skuid installed for CI with sfdx. So everytime we run test in a scratch org via a CI server, i need the scratch org to have skuid (managed package) to be pre-...
2
votes
1answer
409 views

Creating package version of package depending on some other packages

So i created package on two other packages. One is managed package from AppExchange named propel and the other is unmanaged package made on my production holding some of metadata that are there. So ...
2
votes
1answer
481 views

SFDX: this.log is not a function when running create commands

If i run this command sfdx force:lightning:component:create --type lwc --componentname TEST_LWC --outputdir force-app/main/default/lwc I get this error message: this.log is not a function This is ...
2
votes
1answer
122 views

confused about the different org types involved in a salesforce development env

I'm new to SF development and only need to do some very small stuff for our org (e.g. triggers, custom fields)... This is our setup: we have a productive Salesforce org with a single licence for our ...
1
vote
1answer
791 views

hitting limits while creating a unlocked package version

I run the following command sfdx force:package:version:create -p SFExtension -d force-app -k xxxx --wait 10 -v DevHub and with my 6th (5 finished successfully) execution I get this error: ERROR: ...
1
vote
1answer
3k views

Visual Studio Code code-completion against Sandbox Org with Salesforce DX

How do I tell Visual Studio Code to use the Symbols from the Sandbox org? I would like to develop Apex using Visual Studio Code, and get code completion based on the configuration / meta-data in a ...
1
vote
0answers
32 views

SFDX error for external objects

I have added external object in an unlocked package. This object is getting call from apex classes. I have added the datasources also. But getting errors like below: 1. Invalid type: Schema....
0
votes
1answer
174 views

Automating scratch org with sfdx plugins

I have been looking to automate the process of creating a scratch org, pushing source (metadata), assigning the permission sets, resetting the password, open the org and much more. After doing some R&...
0
votes
1answer
896 views

SFDX ERROR: Path must be a string. Received null

I recently set up a project using my home PC and have been working with it for a few days, however I've just tried to make some updates using my Macbook and have had a few issues, I've pulled my ...