Questions tagged [scratch-org-definition-file]

A scratch org definition file is a JSON file that specifies a shape from which the scratch org is created. That is: it contains which edition of Salesforce the org will run, which features it has enabled, and its language.

Filter by
Sorted by
Tagged with
0 votes
1 answer
23 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, ...
2 votes
1 answer
67 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
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
1 vote
1 answer
74 views

Can default product quantity of 1 be enabled with Opportunity settings via Metadata API?

From the UI, there is a setting that can be enabled: Setup > Opportunity Settings > When users add a product to an opportunity, insert a quantity of 1 I cannot find a way to enable this via ...
Zosoled's user avatar
  • 93
1 vote
1 answer
99 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
0 votes
1 answer
90 views

How to avoid problem with debugging LWC Javascript?

Due to some recent changes, first: Enabling by default Use Lightning Web Security for Lightning web components Enable Stricter Content Security Policy it becomes impossible to debug LWC Javascript ...
Patlatus's user avatar
  • 15.8k
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
1 vote
0 answers
95 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
0 votes
0 answers
43 views

Territory2 settings fail to deploy from scratch definition file

When creating a scratch org from a definition file, I'm trying to enable Territories for Leads using the supportedObjects property which is documented here: Territory2Settings | Metadata API Developer ...
Zosoled's user avatar
  • 93
1 vote
1 answer
178 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
3 votes
1 answer
159 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
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
457 views

Second Generation Package version. Can I assign a permission set when creating a 2gp?

Updating my Question Again : I started a new project, got fresh source and created a new package. No problem. Still stuck on creating a new version with eh same Project-scratch-def.json and sfdx-...
CascoSteve's user avatar
0 votes
1 answer
134 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
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
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
106 views

Enable Learning Paths in Scratch Org

Which feature/setting must be enabled in Scratch Org Definition to enable Learning Paths?
Karol Zaorski's user avatar
0 votes
2 answers
243 views

Scratch Org: How to increase API Usage limit (i.e. allowed number of API requests per 24 hours)

Is there any way to increase API Usage limit in scratch org? I cannot find any setting to do so via json config file (we can increase number of custom objects, apex code size limit etc., but nothing ...
wesaw's user avatar
  • 2,980
0 votes
2 answers
470 views

Add new Address field setting in Scratch Org definition file

I need to automatically check the new User Interface setting : Use custom address fields (Beta) upon creation of a Scratch Org. I am not sure what setting to add in the def.json file. The following ...
S..'s user avatar
  • 1,205
4 votes
1 answer
822 views

Access scratch org from login.salesforce.com or test.salesforce.com

Is there a way to change the Instance Url or the Login Url for the scratch org? I want to create a scratch org that can be logged in from a standard login.salesforce.com url instead of domain-specific ...
Yogesh D's user avatar
  • 580
0 votes
0 answers
635 views

Variable does not exist: MailingCountryCode

When I try to deploy to a scratch org a class that references the field MailingCountryCode on the object Contact, I receive the following error message : Variable does not exist: MailingCountryCode (...
THEDJA's user avatar
  • 125
5 votes
2 answers
640 views

Can I create scratch org with some languages activated in Translation Workbench?

I'm trying to create scratch org where the languages in Translation Workbench would be marked as 'Active' by default. For example I would like to create scratch org with Japanese activated by default. ...
Rimorion's user avatar
3 votes
1 answer
390 views

SFDX Scratch Org Creation - queueRoutingConfigs - Not Available for Deployment to your organisation

I'm attempting to create scratch orgs via GitLab pipeline which includes LiveAgent, Omni-channel and skills. Looking at the Metadata Coverage report I can see that queueRoutingConfig is supported. And ...
David Picksley's user avatar
1 vote
1 answer
207 views

Is there a command you can use to get a list of all features that are currently active in an org?

Looking to make a near-perfect scratch org definition without using org shapes. I see there may be a way to do it with the tooling api but I'm not exactly sure how. It'd be nice to have an sfdx ...
cente's user avatar
  • 11
2 votes
1 answer
795 views

Possible to add Remote Site Settings to Scratch Org from sfdx cli?

I've been experimenting with a build script to generate a scratch org based on a Devhub that uses external API calls. Ideally this script would Build the scratch org and add Remote Site Settings for ...
seflo's user avatar
  • 23
4 votes
1 answer
472 views

Lightning Knowledge in Scratch Orgs not working

We are using the following scratch org definition file: { "orgName": "test_de", "edition": "Enterprise", "country": "US", "...
smukov's user avatar
  • 5,503
0 votes
0 answers
29 views

Scratch org creation if failing with these 2 symptoms today - why? [duplicate]

The failures are occurring for both our Continuous Integration (CI) builds and out interactive creates. The CI output is: Run sfdx force:org:create -f config/project-scratch-def.json -a scratch-org -...
Keith C's user avatar
  • 134k
3 votes
1 answer
857 views

Error creating scratch orgs with "Communities" enabled

I am following the steps listed here Build scratch org definition file in order to enable communities for a scratch org, but the following error is received: We couldn't find a template with the ID ...
Alex Cortes's user avatar
1 vote
2 answers
594 views

CLI Scratch Org misbehaving behaviour on enableRelateContactToMultipleAccounts

I am using CLI to create Scratch Orgs based from a definition file. The objective is to enable ContactsToMultipleAccounts when pushing our source data. The issue, is the Scratch Org is being created ...
David Picksley's user avatar
1 vote
2 answers
543 views

Create a scratch org with specified unlocked packages installed?

Is it possible to create a scratch org with unlocked packages (available on the dev hub org) to be installed automatically?
kratos's user avatar
  • 521
1 vote
1 answer
214 views

How to add Salesforce Inbox in Scratch Org definition

How do we add Salesforce Inbox in our scratch org definition file? I'm trying to build a 2GP, in which I have a permission set group that is referencing the following permission set - ...
Zhan Levov's user avatar
1 vote
1 answer
642 views

Scratch Org setup Deterministic Encryption

I get the following error when pushing my source to a scratch org. Deterministic encryption not available I have a permission set assign to my scratch org user that gives me ManageEncryptionKeys. I ...
Tyler Zika's user avatar
  • 2,808
1 vote
1 answer
591 views

Your org doesn't have access to component home:newsPanel

I am running a PS script with sfdx force:source:push to a scratch org and getting the following error: Your org doesn't have access to component home:newsPanel. The scratch org is being created a ...
Dmitriy's user avatar
  • 13
1 vote
1 answer
259 views

SFDX Scratch org Reports Deployment

I have two questions 1). I have been trying to create a package in scratch org with all the Objects and the dependent files and the respective Reports too. Configured the Config file based on the ...
SFDC's user avatar
  • 461
3 votes
2 answers
462 views

Enable Opportunity Teams/Opportunity Split in scratch org definition file

Is there a way to enable Opportunity Teams in a scratch org definition file? I tried this in my file but it didn't work. { "settings": { "opportunitySettings": { ...
Madhu's user avatar
  • 31
1 vote
1 answer
729 views

AccountContactRelation won't deploy to Scratch Org even with feature enabled in Scratch Org Definition

I am trying to migrate my team to scratch orgs from individual dev sandboxes. The final barrier seems to be the fact that we're using the AccountContactRelation object. Whenever I do a push to a ...
Jeff Bennett's user avatar
2 votes
1 answer
290 views

Errors I get when I use sfdx to install Field Service Lightning in a scratch org

I've followed the guidance from this answer — using this in my project-scratch-def.json: { "features": ["FieldService:1"], "settings": { "...
bkwdesign's user avatar
  • 541
1 vote
1 answer
193 views

Scratch Org - Generate Keys automatically

I would like to know if anyone has a way of generating platform encryption keys when building a scratch org? Currently, the way I know is to Create a Permission set with: MANAGE ENCRYPTION KEYS ...
Moazzam Khan's user avatar
3 votes
2 answers
459 views

Create Scratch Org with specific Territory2Settings

I am trying to create a scratch org with Territory2 enabled, as we have this in our production org and I want to mimic it as good as possible. The full documentation for this metadata can be found ...
Bast's user avatar
  • 161
1 vote
1 answer
114 views

External App License for Scratch org

Deploying profiles to Scratch Org, got error userLicense - no UserLicense named External Apps found because I don't have External App license on scratch org. Can't find how to create with this license,...
Alexnader's user avatar
0 votes
1 answer
576 views

scratch org Deployment failed

Below is the config file for the sfdx project { "orgName": "Test company", "edition": "Developer", "features": ["MultiCurrency"], &...
Poornima's user avatar
3 votes
1 answer
412 views

Generate Scratch org definition settings for MDAPI settings

I am trying to convert a messy orgs metadata into a DX project with a scratch org. Converting the metadata was easy using sfdx:mdapi:convert but pushing fails as the org shape doesn't match the ...
Robert Sösemann's user avatar
1 vote
1 answer
321 views

Enable the Enhanced Profile User Interface in a new scratch org

Every time I create a new Scratch Org, it uses the old profile user interface. Is there a scratch org definition file config setting I can toggle so that the Enhanced Profile User Interface is enabled ...
JP Seabury's user avatar
1 vote
1 answer
563 views

How do I create a Scratch Org with Digital Engagement enabled?

I need a Scratch Org with Digital Engagement enabled. Digital Engagement Digital Engagement for Sales Cloud Which Scratch Org Feature do I need to use to achieve this? I cannot see any mention of ...
Robs's user avatar
  • 9,027
1 vote
2 answers
1k views

Scratch Org: Source Push Error: reached maximum number of custom objects

I am trying to push a lot of source from a Dev Org into a Scratch Org using: sfdx force:source:push It gets to: SOURCE PROGRESS | ...... 287/348 Components And then I am getting a load of problems/...
Robs's user avatar
  • 9,027
1 vote
1 answer
264 views

sfdx “IndustriesActionPlan is not a valid Features value.” in Winter '21

A little while ago an issue showed up on the winter '21 version where sfdx force:org:create throws the error IndustriesActionPlan is not a valid Features value. I am aware that this was fixed in a ...
Desmond Nzuza's user avatar
3 votes
1 answer
722 views

Scratch org - Pushing email alert which are using OrgWideAddress

I want to push the code which has email alerts. However, it is not allowing because in the email alert its using org-wide address. I searched and it seems not possible at this moment(v50.0). However, ...
Ysr Shk's user avatar
  • 3,096
1 vote
1 answer
235 views

CI/CD Pipeline -> scratch org -> force:apex:test:run -> portal account owner must have a role [duplicate]

I run a tests in GitLab PipeLine sfdx force:apex:test:run --wait 10 --resultformat human --codecoverage --testlevel RunLocalTests and get error System.DmlException: Insert failed. First exception on ...
SFguru's user avatar
  • 25
2 votes
1 answer
1k views

Create Scratch Org Definition file

To create a scratch org, a Scratch Org definition file should be created. Is there any way to identify the list of features and settings required? Note: Our org has a lot of features as it is ...
Isuru Buddhika Herath's user avatar