Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [scratch-org]

A scratch org is an org type that is meant to be temporary, built from source, used for development or testing, then destroyed when done. Scratch orgs are managed using the Salesforce DX command line.

3
votes
0answers
23 views

SFDX: Create unlocked package version - What is happening behind the scene?

When we are creating unlocked package version in 2GP, we don't need to have packaging org at all to deploy code there, upload package etc. (as it was with first generation packaging). So we just ...
1
vote
1answer
32 views

Error In Deploying LWC

I'm trying to deploy my code but when It's not updated in custom components Kindly advice what's the issue and can you advice also the difference between working on scratch orgs and non-scratch orgs ...
1
vote
0answers
18 views

Pushing a Connected App with the SFDX CLI results in “invalid cross reference id”

I'm working towards moving an existing managed package over to the SFDX CLI metadata format. Part of the application is a Connected App which forms a core part of a SSO process to an external system ...
3
votes
2answers
31 views

Get Standard User Profile Id no matter what the users language is

When a (scratch) org is created by a non-english user this query will have no results: [SELECT Id FROM Profile WHERE Name='Standard User'] Instead you have to use a localized name (here in German) [...
1
vote
1answer
41 views

Scratch org created from Bitbucket pipeline has no Standard User profile

To build DX unlocked packages I am using Bitbucket pipelines. I use the Salesforce configuration template for this. image: atlassian/default-image:2 pipelines: default: #These commands run for all ...
1
vote
0answers
26 views

Create a scratch org with a namespace, but without DX project structure

We are trying to use sfdx only to spin up scratch orgs with desired configuration (we have a standalone config file, scratch-org-def.json to feed to force:org:create command). Our project is in old ...
2
votes
0answers
15 views

Scratch Org creation for Non-native clouds (e.g. Financial, Commerce, Marketing Cloud, Pardot,..)

We have developed managed packages for customers that extends Salesforce products that are not fully native like Sales Cloud. I mean products that you have to install in your org like Financial ...
2
votes
2answers
90 views

Unable to deploy metadata from Partner Developer scratch org because of extra fields

As I hoped for higher limits I created my scratch org as a "Partner Developer" org. { "orgName":"myns", "edition":"Partner Developer", "features":[ "CascadeDelete", "DebugApex", "...
7
votes
2answers
475 views

How can I determine if the org that I'm currently connected to is a scratch org?

When I'm within a Salesforce org, how can I tell if that org is a Scratch Org or not? Ideally this would be via Apex, but it could be an API call if required. This would be useful information for ...
2
votes
1answer
50 views

Scratch org: how to retrieve metadata

Scratch org: how to retrieve metadata I am probably missing some concepts, but this are the steps that I have follow to create a new scratch org from a developer edition org. Created a new dev org ...
0
votes
1answer
27 views

sfdx - selective metadata push

A bit of background: Project currently have a need to implement the Salesforce Shield solution in a project, and currently the Enterprise/Unlimited/etc. scratch orgs do not support this feature. The ...
1
vote
1answer
31 views

Unable to create Professional Edition scratch org with AuthorApex

I'm attempting to create a Professional Edition with the AuthorApex feature (full config file below). This fails with the following error ERROR running force:org:create: The REST API is not ...
0
votes
0answers
27 views

Cannot create a scratch org, getting “ERROR: Cannot read property 'HANDSHAKE' of undefined.”

I followed steps in https://trailhead.salesforce.com/content/learn/projects/set-up-your-lightning-web-components-developer-tools/create-a-lightning-web-component : installed CLI, updated VS Code, ...
3
votes
2answers
121 views

Error when running sfdx update to 7.1.3 then sfdx push errors

When I ran sfdx update from 6.56.0 to 7.1.3 I got the error below. And when I run sfdx force:source:push I'm getting the below error. Are these two related? I'm not sure where to start on the second ...
2
votes
2answers
148 views

ERROR running force:source:push: No org configuration found for name

Not sure why this stopped working but all of the sudden sfdx forgot my org configuration. I pulled down the latest changes from the master branch and went to push them into my checked out branch and ...
0
votes
1answer
35 views

SFDX commands to export and import related objects

I have read everything in the documentation on how to export and import data between orgs using SFDX commands. But I am struggling to write a script which serializes all related objects. Here is the ...
1
vote
1answer
60 views

Reason: invalid_grant - expired access/refresh token

I think my access token for my scratch org expired. I'm using sfdx in visual studio code. What's the easiest way to get/fresh my access token?
0
votes
0answers
31 views

SalesforceDX - standard object, custom fields are not being deployed

I currently testing the possibilites of SalesforceDX and found couple of issues with deploying packages from Prod to Scratch orgs. Does anyone have experienced issues with deploying custom fields of ...
4
votes
1answer
50 views

Remove Expired Scratch Orgs From VSCode

Now that DX has been around for a minute and it's almost 2 years since this question was posed from a CLI perspective, I thought it would be worth asking. Is there yet a convenient way to remove ...
0
votes
0answers
27 views

scratch org with knowledge enabled won't accept custom fields when importing json

Given the following scratch org definition file: { "orgName": "ScratchMe", "edition": "Developer", "features": ["Knowledge"], "hasSampleData": "false", "settings": { "...
3
votes
1answer
57 views

Error when doing force:source:pull after creating an Email Template in a scratch org

I created a scratch org with the default scratch org definition file from sfdx force:project:create, and then I created an email template from the Email templates tab, and a Custom Object. When I did ...
1
vote
1answer
20 views

scratch org definition file - middle name enable and external sharing

I am trying to create a new scratch org definition file that will turn on external sharing and enable middle name. However i get error messages and the documentation isn't great once you get down into ...
1
vote
0answers
43 views

Apex class 'SiteLoginController' does not exist (scratch org)

I've created over 40 scratch orgs with the following config, without issues. { "orgName": "MyScratchOrg", "edition": "Developer", "features": ["Communities","PersonAccounts","SiteDotCom","...
1
vote
0answers
39 views

Scratch org push errors: xmldom error (with force flag only)

Since Winter'19 release my team is getting following errors when pushing our code to the scratch orgs: [xmldom error] element parse error: Error: invalid tagName: @#[line:5,col:38] [xmldom error] ...
1
vote
0answers
30 views

At what time in the day does a scratch org expire?

At what point in the day does a scratch org expire? I am working on a scratch org that expires today (3/11) and am still able to log and run commands against it. Should I anticipate being able to ...
6
votes
1answer
56 views

Scratch Org Site Domain

We've got a public Site.com in our org. When converting and migrating from MDAPI to DX, I noticed even though all the components related to the site were converted and deployed, we still have to go ...
2
votes
1answer
74 views

Has anyone used the Salesforce DX CLI “shape” command?

In the Salesforce Winter '19 release, the Salesforce CLI recently was updated with a command with a CLI call: sfdx force:org:shape. force:org:shape:create create a snapshot of org edition, ...
1
vote
0answers
18 views

SFDX create definition from a dev org

I am wondering if there is a way to create the sfdx scratch org definition straight from a dev org. i am aware of shape and snapshot however these are in pilot and what i am hoping for is something ...
1
vote
1answer
35 views

Moveing old changes from Production to package in SalesforceDX

So my problem is that I just moved to the company and they want to implement CI in way of work with salesforce. So what we did is promote to Enterprise ( it includes scratch orgs package in it ) and ...
1
vote
1answer
36 views

Salesforce DX referring to Global picklist “CustomField not found.”

I have successfully deployed a Global Picklist "State" in scratch Org. Following deployment I am referring the global picklist in a custom field. I am get the following deployment error API Name : ...
4
votes
0answers
47 views

Sharing rules is created but not working on scratch org

I recently try to create a sharing rules on a custom object in a scratch org. Custom object: Foo__c Field: only the default name field. Foo Sharing Settings: Default Internal Access: Private ...
1
vote
0answers
42 views

How to deploy data source of type OData to scratch org

I'm trying to deploy an external data source of type 'OData' to my scratch org. The scratch org is an 'Enterprise' type. I get the following error: This org does not have the appropriate ...
0
votes
1answer
114 views

SFDX - Lightning Web Components trailhead issue - Scratch Orgs being created as Sandboxes

I'm working my way through the "Lightning Web Components Basics" trailhead and I've been directed to the following resource: https://github.com/trailheadapps/ebikes-lwc#installing-e-bikes-using-...
0
votes
1answer
66 views

Not able to deploy SocialCustomerServiceSettings into scratch org

I had retrieved my source code from a sandbox and converted the into source format using the mdapi:convert command. Now, I am trying to push the code into scratch org there is an error showing "The ...
1
vote
0answers
267 views

Salesforce DX - ENOENT error when trying to login

Recently I came upon an error which I cannot resolve. I have searched through google and did not manage to find the answer. I have installed salesforce CLI and when typing the command: in terminal:...
5
votes
2answers
389 views

How to delete Scratch Org user from deleted scratch?

As stated in the title - I created a scratch org and created additional user on it using SFDX. Then after deleting this environment when I try to create user with the same name on another scratch org ...
0
votes
1answer
23 views

Where are the files from an unlocked Package?

I am doing to refactor on my project, to take advantage of the unlocked package (without namespace) from Salesforce. I was able to create a package, etc. The only thing I have troubles understanding ...
0
votes
1answer
70 views

Scratch Org Login and Pushing to Production

I have been having issues setting up a scratch org. So I decided to try out (in Intellij/IlluminatedCloud) creation of a new project under the Sandbox Organization Type. I used my scratch org log in ...
0
votes
2answers
74 views

Salesforce DX Project Structure Clarification

I am having trouble understanding the capabilities of a scratch org. I am in need of someone to take a look and see if it is set up incorrectly or if I am understanding it's capabilities wrong. My ...
0
votes
0answers
43 views

Scratch Org without Data.org enabled

I got the issue that when I create my Scratch org it's created with the Data.com feature on. Thing is, I'm implementing Continuous Integration using Bitbucket Pipline and when I tried to push my ...
0
votes
0answers
96 views

Customer Community license in an Enterprise edition scratch org

Is it possible to have Customer Community license in an Enterprise edition scratch org? My DevHub Org has the licenses but when i create an Enterprise Edition scratch org, the Customer Community ...
3
votes
1answer
44 views

How to set up a scratch org such that System.requestVersion works

We're an ISV transitioning from a classic single org dev setup to DX. We're developing a first generation managed package. One of the problems we're running into is the use of System.requestVersion in ...
1
vote
1answer
89 views

“fatal signup error” when creating scratch org

I have a Dev Hub that is set up in my Developer Edition org. I have been using it for DX development for several weeks, but when I tried to create a scratch org today with the same configuration file (...
0
votes
0answers
24 views

Not Listing Scratch Orgs in SDFX CLI

When I create a scratch org I get an error but the org gets created anyway. The error I receive is "ENOENT: no such file or directory" which I don't think is related to DX. There is no way for me to ...
1
vote
1answer
70 views

Unable to authenticate through REST API when using scratch org

I'm having some trouble getting the REST API to work on a scratch org. When I call the login endpoint I get the error "invalid grant". (This happens when I try test.salesforce.com as well as login....
4
votes
1answer
69 views

SalesforceDX: Scratch Org's support for Files and Libraries flawed

I am developing a package based on salesforce DX which requires files (images) to be installed. I want to put them into a special library so they do not get mixed up with other content. When I log ...
8
votes
1answer
86 views

Slow scratch orgs causing Apex CPU time limit to be hit about 20% of the time - any workarounds?

We have an SFDX build set up that runs our 2,800 tests against 6 different scratch org configurations in parallel. But every build fails on what seems like a random one of the scratch orgs (i.e. it ...
1
vote
2answers
1k views

Lightning web components issue with SFDX push and pull

I Create an sfdx scratch org using Quick Start: Lightning Web Components . I also created a sample hello world lightning web component and pushed it to the scratch org and everything works fine as I ...
5
votes
2answers
343 views

What is the definition of “daily” for “how many scratch orgs you can create daily”?

This Scratch Orgs page talks about "how many scratch orgs you can create daily" and I just ran into this error: LIMIT_EXCEEDED: The signup request failed because this organization has reached its ...
3
votes
1answer
70 views

Is there documentation for the different user license types within each edition of scratch org?

I need to know which user license types are available in developer scratch org vs enterprise scratch org vs group scratch org vs professional scratch org. These are all the types of editions scratch ...