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.

Filter by
Sorted by
Tagged with
0 votes
1 answer
28 views

How to configure sfdx-project file to create proper build scratch orgs for a managed 2GP with custom object/fields?

I have a managed 2GP package. It has custom objects. The whole project is in SFDX format and stays in a single folder force-app/main/default. when running the tests on the Dev Hub - all works well, ...
0 votes
0 answers
40 views

Manage permissions "The list view you requested was deleted, or you don't have permission to view it."

I'm using a Scratch org and trying to assign a Permission Set to a User. I go to "Setup" > "Permission Set" > Select a permission set > "Manage Assignments" > ...
Alberto's user avatar
  • 11
0 votes
0 answers
40 views

Need Help Speeding Up Package Installations in GitHub Actions

Hey Salesforce Community, We're facing a challenge with our GitHub Actions CI setup, and we could use your insights to make it snappier. Background: We recently updated to the latest Salesforce CLI ...
Jesus Martinez's user avatar
2 votes
1 answer
64 views

Do scratch orgs have weird behaviors with connected apps? Being given "Invalid_grant" with "user hasn't approved this consumer"

I have created a scratch org and installed a connected app to it. I've set the policy to "Admin Approved users are pre-authorized". I've given the connected app access to a permission set ...
Kiet T's user avatar
  • 21
2 votes
1 answer
68 views

Custom domains aren't allowed in scratch orgs

I am currently working ISV project which helps Salesforce Customer in the issuance and renewal of CA Signed Certificates, be it with Let's Encrypt or any ACME-compliant CA. Standard flow of issuance ...
Gael Motte's user avatar
0 votes
2 answers
104 views

Scratch org created but CLI errored - Error authenticating - can't access scratch org

Last week I created a scratch org with no problems. Today I tried creating a new one with: sfdx auth:web:login to my dev hub account and sfdx force org create -f config/project-scratch-def.json -a ...
gkri's user avatar
  • 111
0 votes
1 answer
69 views

Deploying CRM Analytics Components to Scratch Org Fails

We have developed CRM Analytics components in a developer org on which SF Support enabled CRM Analytics licenses for us. The long term goal is to package these components and the first step is to be ...
Tom Hoban's user avatar
0 votes
0 answers
26 views

Error creating scratch org in Azure Pipeline

I'm stuck in the same error for a long time. I have a template pipeline that creates a scratch org and do more things. I have another pipeline that uses the template and passes it some parameters: ...
ximo12's user avatar
  • 1
0 votes
1 answer
481 views

Error (1): The requested resource does not exist Faced, While creating 2nd generation Managed Package

I am trying to create a second generation beta managed package for learning purpose. Firstly I have created a namespace org where namespace is present. After that I have created a dev hub org in which ...
Parvez Alam's user avatar
1 vote
2 answers
245 views

Multicurrency cannot be enabled in scratch org

Due to summer '23 release, it is now not possible to specify Multicurrency as a feature in the scratch org definition file. Therefore, it has to be enabled under settings: "settings": { &...
mathias9395's user avatar
2 votes
2 answers
314 views

Summer '23 scratch org won't load

After the dev hub was upgraded to summer '23 then new scratch orgs won't open. The scratch org just shows a blank white screen and nothing will load. Has anyone had a similar problem or know how to ...
mathias9395's user avatar
0 votes
0 answers
25 views

Obtaining Flow ID from a Bash script

I need assistance with my Bash script for creating a link to a flow in Flow Builder that I want to open. I am encountering an issue where I am getting a null value from the $response variable. I would ...
elvi's user avatar
  • 1
0 votes
0 answers
51 views

Reset 'Salesforce for Slack App' from deleted scratch org

I encountered an issue while testing the 'Salesforce for Slack App' with my scratch org. After deleting the scratch org using the sfdx command, I'm unable to establish a connection between the ...
Mamed Mamedov's user avatar
1 vote
0 answers
90 views

OrgShape for unlocked packages with encrypted fields

OrgShape is a brilliant concept and useful in many ways especially for larger orgs. Unfortunately, creating unlocked packages fails when a repo has encrypted fields. It also fails while creating ...
Neel's user avatar
  • 11
1 vote
1 answer
85 views

Why would SFDX interpret Customfields as EmailServicesFunctions (project deploy preview on a scratch org)?

I created a scratch org, and I plan to deploy a basic schema to it. Being rather new to sfdx, I first run a sfdx project deploy preview, and the cli outputs me the weirdest thing: it seems to ...
Werlin's user avatar
  • 13
1 vote
1 answer
101 views

Map and Location Settings fails to deploy to scratch org

When attempting to create a scratch org with Map Settings turned on, I get the following error: "The object 'MapAndLocation' of type Settings metadata does not exist." However, the scratch ...
Rob Davis's user avatar
  • 166
1 vote
0 answers
101 views

Tests pass in scratch org, fail in package creation

I've written the following super simple Apex class and some tests for it (attached below): public with sharing class BuyerStatusFetcher { @AuraEnabled(cacheable=true) public static List<...
Alberto's user avatar
  • 11
0 votes
1 answer
28 views

Package version creation results in field integrity exception (Case access level below organization default)

I am trying to create a package version. My dev hub has the following for case: Running a query under dev console gives me: When I try to create a package version, I get : Practice_Assignment_Team: ...
Strong Like Bull's user avatar
2 votes
1 answer
112 views

Scratch orgs are created with Russian language for Ukrainian and other Eastern European Dev Hubs even if Dev Hub language is English

Why scratch orgs are created with Russian language for Ukrainian and other Eastern European Dev Hubs even if Dev Hub language is English? This happens for Ukrainian, Lithuanian and other Eastern ...
Patlatus's user avatar
  • 15.8k
0 votes
0 answers
49 views

Error deploying Task record types to scratch org: Element values invalid at this location in type RecordType

I am trying to push a particular Salesforce code base to a fresh scratch org. I am stuck on deploying the Task object, getting the following error: Error Task Error parsing file: Element {http://soap....
bullcitydave's user avatar
1 vote
0 answers
96 views

Generate a Scratch Org Definition File from an Org Shape?

Is is possible to generate a scratch org definition file from an org shape? Org Shape is still buggy. I'm running into this known issue with Experience Cloud sites. It would be nice if I could use a ...
Mark Hansen's user avatar
1 vote
1 answer
44 views

Scratch org has no Rollup Summary Limit for Case

Received an error when trying to create a scratch org that we have exceeded the limit of 25 rollup summary fields for Case. We have 31 such fields but Salesforce bumped us up to 35 some time ago. This ...
bullcitydave's user avatar
1 vote
1 answer
179 views

Strategies to successfully create scratch orgs

Have noticed it can be very difficult to successfully create scratch orgs. Wondering if something I am doing is contributing that. Sometimes it works. Sometimes it doesn't. I have tried both of these ...
nstuyvesant's user avatar
0 votes
1 answer
63 views

Can we create a user in scratch and get its SFDX Auth URL in CI or change email of the default user?

We have a CI script which build a new beta package version out of the source code in SFDX format and when the package version is built, the new scratch org is created so that a previous release ...
Patlatus's user avatar
  • 15.8k
0 votes
0 answers
112 views

Authorise a Dev Hub: Error: We can’t query your org

BACKGROUND I want to Authorise a Dev Hub, such that I can create a scratch org. I am system admin on our org. I run the command: SFDX: Authorize a Dev Hub From the command palette. I then ...
Robs's user avatar
  • 9,047
3 votes
1 answer
428 views

What does the error code "VR-0002" mean when creating a scratch org?

Been getting this error when creating a scratch org: The request to create a scratch org failed with error code: VR-0002. The definition file is quite simple, so I don't know what might be causing ...
Renato Oliveira's user avatar
3 votes
1 answer
160 views

Create professional edition scratch org

I need to check Managed Package Beta Version on a Professional Edition Org. I am trying to make a Professional Edition Scratch org for it. But every time I get the same error: "The request to ...
Konstantin's user avatar
2 votes
1 answer
84 views

Partitioned domain for scratch orgs suddenly rolled back

On October 2022, our instance (DevHub) was upgraded such as that new scratch orgs were created using partitioned domains. We then adjusted all our internal mappings to include the extra .scratch on ...
imTachu's user avatar
  • 203
0 votes
0 answers
49 views

Reduce Creation Time: NebulaLogger in a Scratch Org during CI

We want to use NebulaLogger. We also have a CI job that creates a scratch org on a new Pull Request. Technically everything works fine. The only issue is the time it takes to create a scratch org ~40 ...
Eduard's user avatar
  • 5,037
1 vote
1 answer
290 views

What is maximum value of -w (wait) parameter of sfdx force:org:create command?

What is maximum value of -w (wait) parameter of sfdx force:org:create command? We often receive an error Org creation failed with error ScratchOrgInfoTimeout ScratchOrgInfoTimeout: The client has ...
Patlatus's user avatar
  • 15.8k
0 votes
0 answers
41 views

Specify Change Data Capture Entities in Scratch Org Definition

Is it possible to enable and configure change Data Capture for specific entities in a scratch org definition file? I know that you can add "ChangeDataCapture" to the list of features, but I ...
aaron's user avatar
  • 845
1 vote
1 answer
111 views

SFDX Org Creation command fails with strange error `DomainNotFound` `The org cannot be found`

I have a command in the CI to create a scratch org sfdx force:org:create -f config/project-scratch-def.json -a scratch-org -s -d 1 -u Prod --json Whether I execute it through the CI or manually, I ...
Patlatus's user avatar
  • 15.8k
1 vote
1 answer
274 views

Setting up debugger with Apex Salesforce in Visual Studio Error "Either your org or user doesn't have the permission to debug Apex"

I am trying to set up breakpoint and debug my code in Apex, but for some reason I get the following error when running the debugger: My lunch.json is as following: I am using Scratch ORG and my user ...
Lyubomir Tsvetkov's user avatar
1 vote
0 answers
183 views

Scratch Org: Digital Experience Home Page is Blank - Salesforce CMS Setup

I am having issues trying to setup Salesforce CMS within a scratch org. My project-scratch-def.json: { "orgName": "sfdx-org-name", "edition": "Developer", ...
lu_ke____'s user avatar
  • 353
0 votes
0 answers
49 views

"Push to Scratch Org" is successful but no data is in Salesforce scratch org

I have a big bunch of code I'm trying to get to merge - it's from building an Experience Cloud portal which took a few weeks so it fell way behind our master. We've managed to get the code largely ...
Heals's user avatar
  • 1
0 votes
0 answers
426 views

Scratch-Org from Sandbox

Is there a way to create scratch-orgs from Sandboxes rather from production org? Basically treat a sandbox as Dev-Hub. Devs cannot have access to production Trying to solve the problem around ...
KLab's user avatar
  • 167
0 votes
1 answer
135 views

Enable Opportunity Splits - Scratch Org

Working with scratch orgs, I need to enable OpportunitySplits completely at the point of Scratch Org Creation, and Source Push. Currently, when successfully pushing the below files and settings. The ...
David Picksley's user avatar
0 votes
1 answer
61 views

Project with custom indexes fails on package build command

Writing an app to publish on the AppExchange, and this app contains some text fields that have a uniqueness constraint on them. As per the Salesforce documentation, when that constraint is applied the ...
Renato Oliveira's user avatar
2 votes
1 answer
327 views

Unable to create scratch org with Functions feature?

I've installed the latest CLI versions for SFDX and SF, but still when I try to create a scratch org with mentioned commands. I'm getting the below error: ERROR running force:org:create: Functions is ...
Babul Jha's user avatar
1 vote
1 answer
976 views

ERROR running force:org:list: Parse error in file unknown on line 1

when I am trying to get org list using command sfdx force:org:list It is showing me an error: ERROR running force:org:list: Parse error in file unknown on line 1 earlier it was working fine I am ...
Sagar's user avatar
  • 35
4 votes
2 answers
498 views

CI/CD Benefits of using Scratch Org?

I tried to understand the benefits of using Scratch org for CI/CD, but still not quite get it. According to the Salesforce document: The scratch org is a source-driven and disposable deployment of ...
Wayne Ni's user avatar
  • 600
1 vote
1 answer
106 views

Create UserTeamMember in test classes

I'm trying to create a test class for this operation: List<UserTeamMember> listUserTeamMember = [Select id, ownerId, TeamMemberRole, OpportunityAccessLevel, userId from UserTeamMember where ...
Julien Souchi's user avatar
0 votes
0 answers
119 views

ERROR running force:org:open: ENOENT: no such file or directory, open '/xx/xx'

Recently I created a scratch org in Jenkins after certain amount of time I wanted to open org while successfully authorizing with my devhub org and when I tried to open org with sfdx force:org:open -u ...
Neetesshhr's user avatar
1 vote
1 answer
184 views

Didn't understand relationship 'TaskRelations' - Allow Users to Relate Multiple Contacts to Tasks and Events

Does anyone know how to fix that? What am I missing here? I need to access the TaskRelations object on my scratch org. AFAIK, it should be available when the Allow Users to Relate Multiple Contacts to ...
Pablo Fischer's user avatar
2 votes
1 answer
509 views

Error installing package in scratch org: "Missing Organization Feature: ContactsToMultipleAccounts"

I'm using sfdx to create a scratch org, using org shape. First I create an org shape: sfdx force:org:shape:create -u PRODUCTION Then I create a scratch org with the following json: { "...
Andy Ray's user avatar
  • 1,359
0 votes
0 answers
242 views

sfdx deploying app and customtab together to a scratch org: "CustomTab named MyCustomTab found"

I'm using sfdx to populate a scratch org, and deploying all of my unlocked package metadata in one deployment. My app references a custom tab: <tabs>MyCustomTab</tabs> This tab is both ...
Andy Ray's user avatar
  • 1,359
2 votes
1 answer
631 views

sfdx Scratch Org creation extremely unstable, unusable

Salesforce's Edge network (and infrastructure in general) is well known for being low quality and having lots of outages. sfdx's buggyness is also well known. However, there seem to be some ...
Andy Ray's user avatar
  • 1,359
3 votes
2 answers
220 views

The request to create a scratch org failed with error code: VR-0003

I am trying to create a Scratch Org with a Release of Preview. This is the project-scratch-def.json file: { "orgName": "Winter 23 Preview Org", "edition": "...
Robs's user avatar
  • 9,047
3 votes
1 answer
1k views

Why am I getting "The request to create a scratch org failed with error code: C-1033" when trying to create a scratch org?

When I try and create a scratch org as follows... sfdx force:org:create -s -f config/project-scratch-def.json -a myscratchorg ...I get the following error message: The request to create a scratch org ...
lemming's user avatar
  • 463
3 votes
3 answers
2k views

OmniStudio licenses for Scratch Org

Does anyone know if it's possible to apply an OmniStudio license to a Scratch Org? I'd like to install the OmniStudio managed package (outlined here: https://docs.vlocity.com/en/Prepare-to-Install-the-...
BenBates's user avatar
  • 181

1
2 3 4 5
10