Asset Sharing Model in Scratch Org Definition File not reflecting when creating scratch orgs
Summary
Hello, we are trying to set the Asset object to private and enable asset sharing as we have classes writing to the AssetShare object. When we try to generate a new scratch org, the assetsharing setting is enabled but the OWD is set to controlled by parent. We see that when adding a default record type to the definition file it's getting created, but the sharing model is not reflecting as private. This is causing issues when attempting to generate a package version with reference to the AssetShare object.
Steps To Reproduce:
Please see below for our definition file, not certain if we are doing something wrong here or if this is a bug which we need to raise a case for:
{
"orgName": "ABC Company",
"description": "Baseline definition of the Health Cloud org",
"country": "US",
"edition": "Enterprise",
"hasSampleData": false,
"language": "en_US",
"features": [
"HealthCloudUser",
"Communities",
"ContactsToMultipleAccounts",
"PersonAccounts",
"RecordTypes"
],
"settings": {
"chatterSettings": {
"enableChatter": true
},
"knowledgeSettings": {
"enableKnowledge": true,
"enableLightningKnowledge": true
},
"communitiesSettings": {
"enableNetworksEnabled": true
},
"lightningExperienceSettings": {
"enableS1DesktopEnabled": true
},
"sharingSettings": {
"enableAssetSharing": true
}
},
"objectSettings": {
"asset": {
"sharingModel": "private",
"defaultRecordType": "Test"
}
}
}
Thank you for filing this issue. We appreciate your feedback and will review the issue as soon as possible. Remember, however, that GitHub isn't a mechanism for receiving support under any agreement or SLA. If you require immediate assistance, contact Salesforce Customer Support.
Also seeing same behaviour :(
I applied some workaround 2 or 3 months ago with explicitly including the Asset.object-meta.xml with <externalSharingModel>Private</externalSharingModel> defined into the scratch org build job. I do hope it's still valid a solution
I applied some workaround 2 or 3 months ago with explicitly including the
Asset.object-meta.xmlwith<externalSharingModel>Private</externalSharingModel>defined into the scratch org build job. I do hope it's still valid a solution
I tried this, but unfortunately did not work for me.
This issue has been linked to a new work item: W-10269530
I marked this as a bug since the objectSettings didn't work. the workaround from @szymon-halik (deploying the Asset object including <externalSharingModel>Private</externalSharingModel> after the scratch org creation finished did work for me.
Unfortunately, that's gonna be something on the server that CLI team can't fix, but we can notify the correct folks. If any of you can open a support case, that helps it get prioritization. You can reference W-10269530
We have determined that the issue you reported exists in code owned by another team that uses only the official support channels. To ensure that your issue is addressed, open an official Salesforce customer support ticket with a link to this issue. We encourage anyone experiencing this issue to do the same to increase the priority. We will keep this issue open for the community to collaborate on.