Salesforce DX External Sharing Model
I was working through the Getting Started with Salesforce DX module on trailhead and when it came time to push the Dreamhouse app up to my scratch org I got a dozen or so error messages complaining about all sorts of things.
PROJECT PATH ERROR ────────────────────────────────────────────────────────────────────────────────────────────── ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── force-app/main/default/objects/Property__c/Property__c.object-meta.xml Can't specify an external sharing model for Property__c force-app/main/default/objects/Favorite__c/fields/Property__c.field-meta.xml referenceTo value of 'Property__c' does not resolve to a valid sObject type (65:13) force-app/main/default/objects/Favorite__c/listViews/All.listView-meta.xml In field: columns - no CustomField named Favorite__c.Property__c found (88:16) force-app/main/default/layouts/Broker__c-Broker Layout.layout-meta.xml In field: relatedList - no CustomField named Property__c.Broker__c found (81:19) force-app/main/default/layouts/Favorite__c-Favorite Layout.layout-meta.xml In field: field - no CustomField named Favorite__c.Property__c found (13:26)
Luckily the error messages are pretty useful. In this case it looks like the “External Sharing Model” was not turned on in my scratch org. This appears to be turned off by default.
In order to get this step to work:
-
- Log into your scratch org
sfdx force:org:open
- Go to Setup
- In the Quick Search box look for Sharing Settings
- Click on Enable External Sharing Model
- Log into your scratch org
Keep on trailbalazing!
Thank you for reading! Share your thoughts with me on bluesky, mastodon, or via email.
Check out some more stuff to read down below.
Most popular posts this month
- Reinstalling Windows at 1am
- 2024
- SQLite DB Migrations with PRAGMA user_version
- Everything wrong with developer tools in a single paragraph
- Urge to Edit Old Posts
Recent Favorite Blog Posts
This is a collection of the last 8 posts that I bookmarked.
- Submarines DevCon 2025 Keynote Speech from JoshHaines.com
- The people should own the town square from Mastodon Blog
- Divine Attah-Ohiemi: My 30-Day Outreachy Experience with the Debian Community from Planet Debian
- 25 Years of the Mac OS Dock from The Internet Review
- “Founder Mode” and the Art of Mythmaking from charity.wtf
Articles from blogs I follow around the net
Submarines DevCon 2025 Keynote Speech
I was asked to give a keynote speech at the Rolls-Royce Submarines Developer Conference in February 2025. The post below contains some sanitized details of the talk for both attendees to reference and others to learn from.
via JoshHaines.com February 4, 2025The Pigeonhole Principle
Why perfect organization is not possible. I stare at the blank index pages of my new commonplace book, my pen hovering uncertainly. More than two decades of digital design work, and I’m stumped by the simple task of organizing an analog notebook. Come on,…
via Christopher Butler January 17, 202506/01/2025
# Today is the fourth anniversary of switching to my own custom CMS. It doesn't seem possible that I've been using it for that long. Each year I've written about the major changes; these last 12 months have had the least. I started strong with …
via Colin Walker - Daily Feed January 17, 2025Generated by openring