The Stack Overflow podcast is back! Listen to an interview with our new CEO.

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
0
votes
2answers
297 views

Saving metadata to git/bitbucket

How can we commit data from unpackaged folder to the repo folder. I have master repo created and want to commit the changes to the metadata which is retrieved via retrieve cli command. If I try to ...
14
votes
3answers
6k 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 ...
0
votes
0answers
127 views

Salesforce DX setup Problems

I am using the developer edition of the salesforce as of now to learn development in Salesforce. I am tired of using the developer console as it becomes incredibly slow at times. I have been trying ...
1
vote
0answers
436 views

Authentication into Dev Hub does not work in CLI

I type in Salesforce CLI the following command: $ sfdx force:auth:web:login -d -a DevHub My browser opens up a login form. I pick the org which has Dev Hub enabled. Then in browser I am getting ...
2
votes
1answer
495 views

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

I realize the command is still in beta, but I am unable to delete a custom field using the force:source:delete command. I have tried force:source:delete -m CustomField:myObject__c.myField__c, which ...
2
votes
1answer
158 views

Using Salesforce DX with B2B Commerce (CloudCraze)

we are about to work on B2B Commerce (CloudCraze) and are looking into the possibility of using the Salesforce CLI for CI/CD. Can anyone tell me, if this is generally possible and if there are any ...
1
vote
1answer
84 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
427 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
445 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 ...
5
votes
2answers
5k 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
304 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
319 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(...
1
vote
1answer
3k 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
1k 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-...
2
votes
3answers
165 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
64 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
159 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
446 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 ...
1
vote
1answer
475 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
40 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
143 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 ...
2
votes
1answer
549 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
1k 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
1k 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
5k 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
105 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
311 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
1k 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
884 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 '...
13
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
221 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
456 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
288 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
46 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 ...
9
votes
2answers
4k 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
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
182 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
199 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 ...
15
votes
1answer
969 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 ...
13
votes
2answers
4k 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
2k 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
358 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
2k 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
308 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....
5
votes
2answers
3k 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
103 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
50 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
698 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 ...