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
0 answers
81 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 (...
user avatar
  • 55
5 votes
0 answers
140 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. ...
user avatar
3 votes
1 answer
123 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 ...
user avatar
1 vote
1 answer
40 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 ...
user avatar
  • 11
2 votes
1 answer
281 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 ...
user avatar
  • 23
4 votes
1 answer
281 views

Lightning Knowledge in Scratch Orgs not working

We are using the following scratch org definition file: { "orgName": "test_de", "edition": "Enterprise", "country": "US", "...
user avatar
  • 5,248
0 votes
0 answers
28 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 -...
user avatar
  • 130k
3 votes
1 answer
419 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 ...
user avatar
1 vote
2 answers
261 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 ...
user avatar
1 vote
2 answers
179 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?
user avatar
  • 471
0 votes
1 answer
777 views

sfdx push returning No Results found on scratch org

sfdx push a fake class to scratch org is returning no results found. I have a scratch org built on production org shape. Here is the list of actions I tried, sfdx deploy first followed by creating a ...
user avatar
  • 17
1 vote
1 answer
99 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 - ...
user avatar
1 vote
1 answer
314 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 ...
user avatar
  • 2,708
1 vote
1 answer
250 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 ...
user avatar
  • 13
1 vote
1 answer
182 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 ...
user avatar
  • 541
3 votes
2 answers
283 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": { ...
user avatar
  • 31
1 vote
0 answers
379 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 ...
user avatar
2 votes
1 answer
155 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": { "...
user avatar
  • 293
1 vote
1 answer
115 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 ...
user avatar
3 votes
2 answers
278 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 ...
user avatar
  • 61
1 vote
0 answers
68 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,...
user avatar
0 votes
1 answer
414 views

scratch org Deployment failed

Below is the config file for the sfdx project { "orgName": "Test company", "edition": "Developer", "features": ["MultiCurrency"], &...
user avatar
3 votes
1 answer
180 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 ...
user avatar
1 vote
1 answer
170 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 ...
user avatar
1 vote
1 answer
230 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 ...
user avatar
  • 8,262
1 vote
2 answers
626 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/...
user avatar
  • 8,262
1 vote
1 answer
165 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 ...
user avatar
3 votes
1 answer
342 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, ...
user avatar
  • 2,761
1 vote
1 answer
169 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 ...
user avatar
  • 25
2 votes
1 answer
735 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 ...
user avatar
3 votes
0 answers
235 views

Enabling High Velocity Sales in scratch org

I'm trying to set up CI/CD in a project which has "High velocity Sales" enabled as a feature. The setting file in prod for this feature as it is: <HighVelocitySalesSettings xmlns="...
user avatar
4 votes
1 answer
249 views

sfdx force:source:push failing with error: Could not resolve list view column: OPPORTUNITY_SCORE

I created a scratch org off one of my production dev hubs, and am trying to push my source code into it. The push fails with an error "Could not resolve list view column: OPPORTUNITY_SCORE". ...
user avatar
0 votes
1 answer
470 views

The template specified in the scratch org definition is unapproved. Contact Salesforce Support to request template approval

While creating the scratch org using SFDX CLI with Command as below: sfdx force:org:create -s -f <SCRATCH ORG DEFINITON FILE> -a <ALIAS NAME> -d <DURATION> sfdx force:org:create -s -...
user avatar
0 votes
0 answers
42 views

How to find out all custom fields, LWC/Aura/VF, apex classes and triggers required in a Lightning Community?

I would like to include a Lightning community (ExperienceBundle, Network and Custom Site) in an unlocked package so as to be able to develop codes using scratch orgs as well as have it in CI/CD ...
user avatar
2 votes
0 answers
31 views

Manifest retrieves fields that belongs to managed package and more

I would like to retrieve only the necessary data from my production org (which has several installed managed packages). But when I retrieve the data in my manifest (package.xml) from org in order to ...
user avatar
1 vote
1 answer
66 views

Not able to see "OtherStateCode" field in Contact object

I'm retrieving the metadata from my Dev Hub org in the manifest to push it to a scratch org, but I'm getting the following error in some apex classes when pushing to default scratch org: No such ...
user avatar
3 votes
1 answer
171 views

Scratch org creation fails Error parsing Address.settings

When I try to make a scratch org with the command: sfdx force:org:create --targetdevhubusername DEVHUB --wait 10 --durationdays 1 --definitionfile project-scratch-def.json I get the following error: ...
user avatar
1 vote
1 answer
106 views

SFDX enable Asset Sharing Scratch org

How can we enable Asset Sharing as we create a scratch org? The only way I know to enable it is by switching to classic and navigating to it on the Setup menu. I would like to script this or define it ...
user avatar
  • 1,345
4 votes
1 answer
365 views

Is there any way to make a shell script to automate creation and preparation of a scratch org wait between steps?

I have the following shell script: sfdx force:org:create -f ./config/project-scratch-def.json -a ScratchOrg sfdx force:package:install --package 04t0M000001mF9bQAE -u ScratchOrg sfdx force:package:...
user avatar
2 votes
1 answer
110 views

Scratch org feature "WorkThanksPref" raises error "An unknown server error occurred"

Adding the "WorkThanksPref" to a scratch org definition file is preventing a scratch org from coming up. The error is: An unknown server error occurred. Please try again. If you still see this ...
user avatar
  • 1,169
0 votes
1 answer
154 views

Error deploying process to scratch org: "A condition has a reference to... which doesn't exist."

We have a process which has this criteria: The XML metadata for this workflow has: </conditions> ... <leftValueReference>myVariable_current....
user avatar
  • 1,169
3 votes
1 answer
1k views

Error deploying to scratch org: "no QuickAction named FeedItem.RypplePost found"

We're encountering an error deploying to a new scratch org: no QuickAction named FeedItem.RypplePost found This is defined in a standard layout, force-app/main/default/layouts/EmailMessage-Email ...
user avatar
  • 1,169
0 votes
1 answer
178 views

SFDX force:source:push fails only in CI environment

I am trying to shift a hybrid codebase to SFDX. I'm using Gitlab CI running in the default gitlab-runners and for some reason I haven't been able to discover I keep having my code deploys failing. I ...
user avatar
  • 13
1 vote
0 answers
189 views

Set organization wide email in scratch org? [duplicate]

When trying to deploy an auto responder rule to a new scratch org, we're getting: [email] is an invalid From email address.: Email Address Is there a scratch org config to set an organization wide ...
user avatar
  • 1,169
0 votes
2 answers
338 views

Scratch Org is created without an alias and presented: ERROR running force:org:create: Cannot read property 'details' of undefined

I'm not sure where to look to help me troubleshoot this issue. I've tried reinstalling the CLI - logging out and logged back into the orgs. When I use the same sfdx:force:create command as a ...
user avatar
1 vote
0 answers
595 views

Problem When Creating Scratch Org

I'm trying to create a Scratch ORG, but everytime I get the same error: Failed to deploy settings to scratch org. When I run Terminal, I got the following message: shape/settings/Bot.settings ...
user avatar
  • 107
1 vote
1 answer
459 views

Create scratch org with Enhanced Email activated

I am trying to automate the creation of scratch orgs, when trying to install a needed managed packaged after scratch org creation I get this error: ERROR running force:package:install:report: ...
user avatar
  • 13
2 votes
1 answer
105 views

Enable email to salesforce in scratch org definition file

I need to enable this function as part of the CI, soemthing like this: "emailSettings": { "enableEmailToSalesforce": true } But this isn't the right option, i'm having an error to create ...
user avatar
5 votes
3 answers
4k views

Failed to deploy settings to scratch org

I am getting this error while creating the scratch org: [![enter image description here][1]][1] { "status": 1, "name": "ProblemDeployingSettings", "message": "Failed to deploy settings to ...
user avatar
1 vote
1 answer
458 views

Enable Account Teams in scratch org definition file

Is there a way to enable Account Teams in a scratch org definition file? I know I can manually enable it in a scratch org via Setup, but in order to create an unlocked package version that contains ...
user avatar