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
2
votes
1answer
567 views

Script to dynamically generate XML file based on most Git commit contents (Salesforce CI)

I'm using DX for my Continuous Integration, but post-scratch org when I want to deploy into a traditional sandbox for staging, I'm struggling with an automated way to deploy only the new commits (as ...
7
votes
2answers
8k 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 ...
2
votes
1answer
352 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 ...
4
votes
1answer
385 views

Best practice to setup a development environment with source control,vscode and sandbox

i have been working on the traditional way of developing within salesforce using Force.comIDE / aside.io / developer console. i want to move to a more robust way of writing code using a source control(...
2
votes
1answer
4k views

SFDX: Deploy Source to Org : Error - SourcePathInvalid

I am Getting SourcePathInvalid for file path c://projectpath//projectname/extension-output-#2 at deployment time. Please refer attach image for more details.
0
votes
2answers
2k views

sfdx Error while creating package version

I'm working on "Unlocked Packages for Customers" trailhead module. While creating the package version I'm getting below error: ERROR: The --path (-d) value, [force-app], and --package (-p) value, [th-...
3
votes
3answers
193 views

Salesforce DX Use Case

We are a small team of three members and planning to implement SFDX in our project, I have some questions regarding the same. Is there any additional cost involved on sfdx? I believe no, but not able ...
1
vote
1answer
78 views

Query Multiple SObject using Salesforce Cli

Is it possible to export multiple SObjects data records without using Parent Child relationship? Suppose there are 2 SObjects Transaction__c and Country__c independent of each other.. I want to export ...
1
vote
1answer
225 views

How to use SFDX to import related records using an External ID from CSV File?

My question is as the title stated. In data loader, we can achieve this by explained in this official article: https://help.salesforce.com/articleView?id=000002783&type=1 One field in object B ...
5
votes
5answers
482 views

“ logger is not defined” on sfdx force:user:display output? [BUG]

I'm getting ERROR: logger is not defined. error after issuing sfdx force:user:display command. What I'm trying to input is: sfdx force:user:display sfdx force:user:display -u username It ...
2
votes
1answer
672 views

How can I upsert & populate Lookups with external Id using sfdx?

Trying to run the following command on my org using sfdx (Upserting csv into my scratch org) : 'sfdx force:data:bulk:upsert -s Product2 -i ExternalId__c -f data/srv-allproducts.csv -u MyORG ' This ...
3
votes
0answers
55 views

SFDX Can't Pull Source from Scratch Org “Metadata API received improper input” AppMenu and AppSwitcher [duplicate]

I'm using SFDX and I made a change to the visibility of my app in my scratch org but when I try to pull the changes down (sfdx force:source:pull) I get: ERROR: Metadata API received improper input....
0
votes
2answers
179 views

Does Salesforce DX support Amazon Linux AMI?

Is there any way to install Salesforce DX CLI on an Amazon Linux AMI EC2 instance or does it only support Ubuntu? If it doesn't support the AMI OS, Is there anything on the roadmap? I need to the DX ...
4
votes
1answer
710 views

How to setup Bamboo with Salesforce CLI?

Is there any guide on how to setup Bamboo with the Salesforce CLI. We are not using SalesforceDX yet but just want to setup a job to deploy from GIT repo in BitBucket onto a sandbox. I guess the steps ...
1
vote
1answer
2k views

How to get a complete new PULL of the scratch org components?

Currently when we issue the sfdx force:source:pull -f command, SFDX only pulls the differences in components. I want to know if there is a way to get a complete refreshed copy of "force-app" ...
4
votes
2answers
2k views

Deploy sfdx project to another sandbox with CI

SFDX project folder structure is little different from previous folder structure where all metadata folders are inside src folder. ANT agent on our Continuous Integration tool works for the old ...
4
votes
2answers
6k views

SFDX: create project using manifest not available

I have visual studio code installed in my desktop and updated SFDX to its latest version. However, when I open up the command palette for 'Create project', I am seeing only the following two options ...
1
vote
1answer
124 views

How to automatically enable Recordtypes for Scratch org admin

Whenever I create my scratch org I have to manually assign Record Types to the Standard User and System Administrator profile. Is there any way to automize that?
7
votes
2answers
347 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 ...
4
votes
1answer
2k views

SFDX CLI fails to connect to orgs with JSON error

I am using the latest CLI version 6.35.1-8b7320f7c2 and when I do sfdx force:auth:web:login -a DevHub -d ERROR: Unexpected token ] in JSON at position 88. Calling sfdx force:org:list renders ...
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 '...
14
votes
2answers
2k 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....
23
votes
2answers
4k 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 ...
0
votes
1answer
304 views

SFDX CLI installation failing on OS X

I am trying to install SFDX CLI on my macbook but it is failing and there are not enough details to see why it is failing. I have gone through the system requirements and my machine matches those ...
7
votes
2answers
485 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:...
0
votes
1answer
432 views

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

I don't understand what is wrong in "Convert the Source and Push It to a New Scratch Org" from trail "Convert and Deploy an Existing App". I get this error: the path specified is not a directory or ...
0
votes
1answer
57 views

Do installing a Managed Package (listed in AppExchange) via Salesforce CLI, create a License & Lead in package developer's LMA org?

Can anyone confirm if this is the case. Though I don't really think this should be allowed, but I'm suspecting random licenses occurring and it's a hunch that they are being generated because it is ...
10
votes
2answers
5k 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 ...
5
votes
1answer
2k 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 ...
0
votes
1answer
397 views

Create standard price book programmatically

I’ve created a scratch org, but it’s empty without a price book. I’d like to create it with script/code/CLI so it can be automated. Unless the price book is in place I can’t really add products w ...
5
votes
1answer
1k views

SFDX: Deploy Source to Org: Errors do not appear as Problems in Visual Studio Code

How do I get the errors returned from command: SFDX: Deploy Source to Org To appear in the Visual Studio Code Problem Window? As this would allow us to click on the error and be taken directly to ...
2
votes
1answer
225 views

How to create Salesforce DX project sub-modules using Visual Studio Code / Salesforce DX CLI

I would like to break my project into multiple submodules: project - config - module-1 -- main --- default ---- classes - module-2 -- main --- default ---- classes - etc Is there a Visual Studio ...
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 ...
15
votes
2answers
6k 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?
7
votes
1answer
3k 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, ...
0
votes
1answer
416 views

Deletion of custom field on standard object not detected by force:source:pull

I did the following: In my scratch org I created a custom field (on a Standard Object). Then I executed force:source:pull so I had that custom field in my project folder. I created a new scratch org ...
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 ...
6
votes
1answer
393 views

Salesforce DX Project Folder Structure

By default the Salesforce DX CLI creates a project with folders: force-ap -- main -- default -- aura And all the examples have files organised by type: classes objects layouts profiles etc....
6
votes
2answers
4k views

How to pull changes from Developer Org when using Salesforce DX CLI

How do I push and pull changes to a Developer Org using Salesforce DX CLI? When I used this command: sfdx force:source:pull I get this error: ERROR: MemberName, IsNameObsolete FROM ...
4
votes
1answer
120 views

Will Salesforce DX work with a custom profile?

Does anyone know if I HAVE to use the standard user profile if I want to assign the Salesforce DX permission set?(I know I can also use sys admin)Or will it still work if I give them a custom profile? ...
0
votes
1answer
57 views

Programatically add org authentication to SalesforceDX

I’m coding a sfdx plugin using the new plugin generator found here: https://github.com/forcedotcom/sfdx-plugin-generate I was wondering if there’s a way to programatically add a new Salesforce org ...
0
votes
2answers
917 views

Problem with force:auth:web:login

I have the following problem: when I try to use the sfdx force:auth:web:login command, nothing happens. When i do it with sudo, a salesforce site opens and I put in my login & password, the site ...
1
vote
0answers
233 views

How to delete a class in Salesforce DX using CLI

I am trying to remove classes and pages from my scratch org. I have removed them my local repo and did sfdx force:source:push but I am getting the below error. Any idea how to resolve? ERROR: Path ...
6
votes
1answer
2k 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 ...
4
votes
3answers
2k views

metadata API: howto deploy only what specified in package.xml

I'm using mdapi:deploy. How do I tell it to deploy ONLY the metadata is defined in my package.xml instead of all the metadata files on my local filesystem? Ex package.xml: <?xml version="1.0" ...
1
vote
1answer
311 views

SFDX - Having to push multiple times for changes to occur in org

When I try to use the sfdx force:source:push call, I'm getting an error that denotes that No package.xml was found. I changed nothing because package.xml does exist in my project directory, tried to ...
5
votes
1answer
1k views

sfdx force:auth:jwt:grant ignoring the instanceurl param

I'm having troubles authenticating to my Dev Hub Org using the JWT token. The command: sfdx force:auth:jwt:grant --clientid *** --username *** --jwtkeyfile *** --setdefaultdevhubusername --...
6
votes
0answers
2k views

DX: force:source:pull returns “no results found” immediately after “force:source:status” reports Remote Changed?

Spun up a new scratch org and pushed source that was just converted from MDAPI. Logged into the org and activated a lightning home page that was part of the source push. After which, sfdx force:...
6
votes
1answer
794 views

How do sfdx-cli version numbers and release notes work?

Just ran sfdx and was prompted: sfdx-cli: update available from 6.24.0-9405104f19 to 6.25.0-085abe54b0 Great! let me just see what's changed. A quick search for "sfdx-cli release notes" netted me a ...
1
vote
2answers
1k 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 ...

1 4 5 6 7 8