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
1answer
40 views

All org info lost every time after computer reboot

so I can connect to the DevHub, spin up scratch orgs without any issue. And when I ran sfdx force:org:list, everything is listed as it should but every time after I reboot my (work) computer, sfdx ...
0
votes
1answer
395 views

Is it possible to retrieve Profiles using Salesforce CLI?

I've created a custom profile in a scratch org using Salesforce CLI. The thing is that by using either sfdx force:mdapi:retrieve or sfdx force:source:pull commands, only the Admin profile is ...
2
votes
0answers
59 views

Do subsequent Unlocked Package version installs deploy FLS?

I've created an Unlocked Package using Salesforce CLI and installed the first version in an org. I've checked the Field Level Security for each Profile and they were all correct. But when I changed ...
10
votes
2answers
531 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 ...
3
votes
1answer
2k 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 ...
0
votes
0answers
23 views

SFDX Exports Ballooning in Size

I've got a scheduled job that pulls down a complete snapshot of some objects' data from Salesforce using the sfdx CLI. I store this data on S3; it's useful for backup purposes and some analysis. A ...
5
votes
1answer
294 views

Can you push multiple artifacts into one scratch org?

When you call sfdx force:force:push there is no param to specify which artifact you'd like to push. In the ./sfdx-project.json file you have package directories and you can specify a default: { "...
2
votes
1answer
107 views

How do you keep production in sync with the VCS when using SFDX?

It's pretty obvious for an Apex Class change - you go through the normal dev cycle and eventually deploy to prod. The change will be in VCS before it hits prod so source control remains the source of ...
1
vote
1answer
250 views

Do you HAVE to enable My Domain if you want to use Salesforce DX?

So as the title says - is it a MUST that My Domain is enabled in order to use SFDX/Salesforce CLI? I'm trying to persuade the business to move to SFDX but they have tonnes of integrations and ...
2
votes
2answers
735 views

Deploying sfdx-converted metadatas to an org with a filtered package.xml

In a DevOps chain, I have a SFDX project. I want to deploy only parts of this SFDX Project to an org, using a custom package.xml My actions are : sfdx force:source:convert -d tmp/deployDemoQuali/ ...
0
votes
1answer
114 views

Can you set a name for a deployed unmanaged package using sfdx CLI?

So, if I deploy an unmanaged packaged from a VSCode Project, I set a package name as part of the convert command, though there's no option to use this as part of the deploy command: C:\sfdx\GDPR_Base&...
5
votes
0answers
88 views

BASH variables in SFDX breaking dot notation in queries

With the most recent update to SFDX CLI, I've noticed that my queries that use dot notation in the select now retrieve null for dot notation columns if I use a bash variable. It's really quite ...
6
votes
2answers
1k 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)?
3
votes
0answers
378 views

sfdx Sharing Settings scratch orgs

We use in our org case sharing (Setup-->Security Controls-->Sharing Settings-->Case (Default Internal Access From Public Read/Write/Transfer to Private)) Wa want this sharing settings in place when ...
2
votes
0answers
199 views

sfdx cli assign role to user [duplicate]

Is there a way to assign a role to some user with sfdx cli command? In my existing tests, i create community user, and the user running the tests must be assigned to some role, else, i have the ...
1
vote
1answer
251 views

Salesforce DX profiles show incorrect metadata changes on pull

We have our most up-to-date metadata source in Git. When we create the new scratch org and deploy our code, it deploys correctly and the profiles have the correct access to all of the objects. However,...
0
votes
1answer
217 views

Error while creating a package2 version in DX

While creating a version for the package2 , I am running into errors example of the errors :Unknown config name "packageDirectories". Unknown config name "namespace". ...
1
vote
2answers
320 views

AUTH not working with DX and Windows Subsystem for Linux (WSL)

I am trying to setup the 'best' environment for using DX for all my development work, specifically the 'best' Command Line tool. I am running Windows 10 and use Illuminated Cloud + Webstorm as my ...
3
votes
0answers
623 views

Install managed packages using sfdx-project.json [duplicate]

So I was wondering or was hoping to get some clarity on the dependencies in a sfdx-project.json file. I know that for my project / scratch org I can list managed package dependencies within the sfdx-...
7
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 ...
2
votes
0answers
94 views

Push custom profiles to Scratch org using Salesforce CLI

I pushed custom profiles to scratch org from my dev org. But permissions of profile were not set in scratch org. I want my scratch org profiles to look exactly same as in my developer org. Please let ...
2
votes
1answer
276 views

DX Package:Install throwing errors via Command Line

I've been walking through the ISV DX session here with a test package in preparation for migrating my general package development to DX It went pretty well until the final step - installing the new ...
7
votes
1answer
4k 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 ...
18
votes
1answer
2k 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 ...
2
votes
1answer
199 views

Salesforce DX Test Coverage

Is there a way to retrieve the overall test coverage of an org using Salesforce DX? I understand there is a way to get the coverage for individual classes using the -c flag, but was looking ...
1
vote
0answers
136 views

SALESFORCE DX: Ancestor package version not installed when creating new scratch org

{ "packageDirectories": [ { "path": "force-app", "default": true, "ancestorId" :"05i7F000000CaRgQAK", "id": "0Ho7F000000GmbCSAS", "versionName": "Version 1.0", "versionNumber": "1.0.0....
0
votes
1answer
438 views

Unable to Authorize Hub Environment with JWT

I'm getting the following error when attempting to authorize a Hub environment to use Salesforce DX. I've set the variables including the path to the server.key. Also, I'm attempting to authorize from ...
2
votes
0answers
117 views

ERR_CONNECTION_REFUSED on DX DevHub trial org

I'm not sure what I'm doing wrong, but I signed up for a DevHub trial org, got the verification email, clicked the verify link and immediately got a This site can’t be reached [domain].my....
3
votes
0answers
630 views

Salesforce DX errors Pushing to scratch org

I'm using DX to push my metadata from an existing org to a scratch org. I have no idea how to resolve this errors and I have looked online but no help and also I looked someone posted here but did not ...
7
votes
3answers
596 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 ...
16
votes
1answer
4k 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.
7
votes
0answers
830 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
1answer
792 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 ...
0
votes
1answer
117 views

Error when pushing to existing scratch org

I keep getting the error Cannot set sharingModel to ControlledByParent on a CustomObject without a MasterDetail relationship field when pushing to an existing scratch org. After doing some ...
0
votes
1answer
181 views

How to remove scratch org details from metadata

When I pull down metadata from my production org (which is my devhub org), I have issues with scratch org metadata meddling with my repo. For example I have custom profiles that were created on the ...
4
votes
2answers
57 views

stop tests from running on meta data deploy

I know from the docs that you can prevent tests from running to deploy code. When I use this command to deploy to my full sandbox sfdx force:mdapi:deploy -d ./src/ -u Migration -w 100 -l NoTestRun I ...
4
votes
2answers
1k 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 - ...
2
votes
1answer
378 views

How do you pipe commands from the Salesforce CLI to a text file?

I can use this to display a list of currently authed orgs: sfdx force:org:display ...and the same in JSON format: sfdx force:org:display --json However, trying any of these or similar ...
0
votes
1answer
1k views

sfdx force:source:push Cannot read property 'getSourcePath' of undefined

When executing force:source:push --forceoverwrite I was receiving the following error when trying to delete a component locally and push the changes. ERROR: Cannot read property 'getSourcePath' of ...
1
vote
1answer
350 views

How to have a scratch org open to LEX on first login?

I'm creating a bunch of scratch orgs to be used for a training workshop, and I've found that whatever I do, the first login takes you to Service Console instead of Classic or LEX. Ideally, I'd want it ...
2
votes
1answer
200 views

How to fetch salesforce dx output json when error happens

I am writing a node js program to execute salesforce dx cli commands. And I am using --json option to fetch the data. When the result is successful, it works perfectly fine. But when error happens, ...
0
votes
0answers
272 views

DX: force:soure:push Cannot read property 'getAggregateFullNameFromFilePath' of null

I'm following this Trailhead tutorial and I'm at "Creating Additional Lightning Components" step 9 where I need to push my lightning components to my scratch org, but when I try to do so I get the ...
9
votes
0answers
199 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
1answer
538 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 ...
3
votes
0answers
2k 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' ...
4
votes
1answer
542 views

DX Deploy - no Quickaction

I'm having trouble deploying to a sandbox. Profiles have been a pretty major pain, so I simply removed all profiles from the mdapi output dir. Now I am fighting QuickActions. In each of my layouts I ...
6
votes
1answer
263 views

How to raise an issue about “sfdx force:apex:test:run --resultformat human”

As most Salesforce test runners report a stack trace that points to the failed test line (and usefully the calling lines that is helpful when more complex test classes are used) we generally do not ...
5
votes
1answer
654 views

Salesforce DX and Managed Package

I'm a bit lost on how to transition from our managed package structure to Salesforce DX and Packaging 2. We want to get our existing metadata into Salesforce DX structure to create our VCS ...
14
votes
1answer
2k 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 ...
11
votes
4answers
2k 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:...