Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

[RESOLVED] Minimal reproducible example to show libraries are broken in Scratch Orgs without hasSampleData

Notifications You must be signed in to change notification settings

mdapi-issues/scratch-org-bug-libraries-not-visible

Repository files navigation

sfdx-libraries-not-visible-mwe

After creating a Library (ContentWorkspace) in a scratch org, the Library is not shown in "My Libraries" and cannot be queried using SOQL.

Reproduction

See gif (newly-created-library-not-visible.gif)

newly-created-library-not-visible

Or create a scratch org and run anonymous apex or/and unit tests:

$ sfdx org create scratch -f config/project-scratch-def.json -a mre-libraries-not-visible -d
$ sfdx apex run -f anonymous-apex-library-test.apex
$ sfdx project deploy start
$ sfdx apex run test -l RunLocalTests -w 10

Actions Status

Failing here means the reproduction was successful

Workaround

Thankfully the Salesforce Partner Support provided a workaround.

In the config/project-scratch-def.json file add "hasSampleData": true.

About

[RESOLVED] Minimal reproducible example to show libraries are broken in Scratch Orgs without hasSampleData

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages