I stuck with issue with choosing custom profiles when 2nd gen package is installed.
Package provides only 'No Access' and 'Full Access' settings, but in my project there are some custom profiles which I would like to choice.
When I have created package the metadata is
{
"destinationProfiles": [
{
"description": "Full Access (Your profile must have full access to the package)",
"displayname": "System Administrator",
"name": " PT1",
"noAccess": false,
"profileId": "profileId",
"type": "Admin"
},
{///All standard profiles from DEV HUB org}
],
"sourceProfiles": [
{
"label": "No Access",
"value": "__noAccess__"
},
{
"label": "Full Access",
"value": "__allAccess__"
}
]
}
But 2-3 days ago I had another package metadata with the same profiles in project:
```{
"destinationProfiles": [
{
"description": "Full Access (Your profile must have full access to the package)",
"displayname": "System Administrator",
"name": " PT1",
"noAccess": false,
"profileId": "profileId",
"type": "Admin"
},
{///All standard profiles from DEV HUB org}
],
"sourceProfiles": [
{
"label": "No Access",
"value": "__noAccess__"
},
{
"label": "Full Access",
"value": "__allAccess__"
},
{
"label": "Custom Profile 1",
"value": "Custom Profile 1"
},
{
"label": "Custom Profile 2",
"value": "Custom Profile 2"
},
{
"label": "Custom Profile 3",
"value": "Custom Profile 3"
},
{
"label": "Custom Profile N",
"value": "Custom Profile N"
}
]
}
And when I installed the package I could choose settings for appropriate profile.
I used sf package version create -d force-app -x -w 30
command to create package version.
There was no changes on my DEV HUB org (or there was but as I could see they did not affect packaging).
Mystery...
Can anyone help to resolve issue? Any thoughts are welcome :)