cli icon indicating copy to clipboard operation
cli copied to clipboard

Asset Sharing Model in Scratch Org Definition File not reflecting when creating scratch orgs

Open AndreyShestakovACN opened this issue 4 years ago • 7 comments

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"

}

}

}

AndreyShestakovACN avatar Oct 20 '21 17:10 AndreyShestakovACN

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.

github-actions[bot] avatar Oct 20 '21 17:10 github-actions[bot]

Also seeing same behaviour :(

DougMidgley avatar Nov 07 '21 18:11 DougMidgley

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

szymon-halik avatar Nov 09 '21 14:11 szymon-halik

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 tried this, but unfortunately did not work for me.

gilmar-lima avatar Nov 09 '21 15:11 gilmar-lima

This issue has been linked to a new work item: W-10269530

uip-robot-zz avatar Dec 06 '21 14:12 uip-robot-zz

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

mshanemc avatar Dec 06 '21 14:12 mshanemc

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.

github-actions[bot] avatar Dec 06 '21 14:12 github-actions[bot]