1

In Winter '16, Salesforce rolled out the Lightning Experience. This can be optionally enabled for particular profiles. Initially this is not available for orgs that are using person accounts. Sandboxes for those orgs may see an option in setup to "Enable Lightning Experience" but that option is not available in production. When that option is available, a number of built-in user profiles are given a LightningExperienceUser permission. If you attempt to deploy those profiles to production however, the deployment will fail and give an "Error: Unknown user permission: LightningExperienceUser" error.

How can this error be resolved?

2 Answers 2

2

Assuming you are having this issue with Continuous Integration, then you will indeed need to run a custom script to clear those things for you. It is not that incommon to do so, actually.

Some metadata bring unwanted things, like groups in an object xml. And those groups might not exist in the target organization, so this is a problem and will produce errors as well.

If you are using Jenkins or Atlassian's Bamboo for deployment, you can easily create a script in, say, Python, to do this boring task for you, and put it as part of your build scripts.

I did something like this when Salesforce migrated from API 33 to 34, and there was a fairly large interval between releases in different instances. There were some permissions that were removed and others that were created on 34. So I had to do two tasks, to clear both migration targets.

1
  • Great to get your feedback on this Renato, thank you!
    – abd3721
    Commented Nov 11, 2015 at 18:46
1

We're logging a ticket with Salesforce support to seek a better resolution for this. In the meantime, we have removed the built-in profiles from our project that we do not have any users assigned to (ContractManager, MarketingProfile, SolutionManager, ReadOnly, Standard), and manually deleted the section of XML below from the System Administrator profile. That allows us to successfully deploy, but whenever we update our project the permission re-appears on the System Administrator profile. Short of having Salesforce support correct this situation for us our only automated solution will be to have a script that runs as part of our automated build process.

The Problematic XML in admin.profile:

<userPermissions>
    <enabled>true</enabled>
    <name>LightningExperienceUser</name>
</userPermissions>

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .