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 Apex code referencing the AccountTeamMember object, I need to enable it in the definition file. But I don't see a way to do this from looking at the Salesforce documentation.
1 Answer
Yes, it's in the Account Settings area. Here's the relevant JSON to start from:
{
"settings": {
"accountSettings": {
"enableAccountTeams": true
}
}
}
See Scratch Org Definition Configuration Values for other settings. Edit: There appears to be values missing from the docs. I'll ask about this. However, I do know this setting works, as I copied it from my own org's configuration file.
-
Thanks! It worked for me as well. Hopefully it gets added to the docs to avoid future confusion. Commented Mar 4, 2020 at 22:32
-
What about opportunity teams? I figured I could use the same format replacing "account" with "opportunity", but it didn't work. Commented Mar 4, 2020 at 23:17
-
3@JeffFreeman
{ "settings": { "opportunitySettings": { "enableOpportunityTeam": true } } }
should do the trick. For some reason, there's no S in Team.– sfdcfox ♦Commented Mar 5, 2020 at 0:56