[SalesForce] The user license doesn’t allow the permission: SubscribeToLightningReports

Currently i'm not able to deploy change set from and to sandboxes in the spring17 release with force.com profiles added. This is only due to the "export reports" option with is ticked on both side (both environment). Do anyone know how to prevent this from happening ?

error : The user license doesn't allow the permission: SubscribeToLightningReports

When I removed this option from the general User permission, the change set is well validated. But i can't go on each profiles which uses the salesforce platform licence to update manually this option after each change set installation. Is there a better way to do this , or another options that is causing the error, but which need to be added with this option?

Best Answer

I faced this issue multiple times, here is one temporary solution i used, you need to set this permission to false for salesforce platform licenses to deploy change sets without errors. Please follow these steps

1st approach:

  1. Go to each SF Platform profile -> Edit -> uncheck run reports, report builder, Lightning Experience User -> save.
  2. Click on edit again -> check them back except 'Lightning Experience User'. Do this in both the environments you using for deployment -> upload the change set -> deploy.
  3. If this doesn't work go to 2nd approach.

2nd approach:

  1. -> Go to workbench salesforce in google - login with your sandbox or production. If you have multiple instances, then login to that instance first and then go to workbench so it takes you to the current sandbox
  2. select queries on top - click soql query from drop down
  3. Object = Profile, Fields = Id, Name, PermissionSubscribeToLightningReports, UserLicenseId (you can select multiple fields by using ctrl)
  4. filter by "PermissionSubscribeToLightningReports" equals "true"
  5. Now, you can see the list of all profiles with this permission set to true
  6. look for any one profile which has salesforce platform license from the list and copy its UserLicenseId
  7. add another filter below the "PermissionSubscribeToLightningReports" (click on + in green) - filter by "UserLicenseId" equals "paste the userLicenseId here" - click on query
  8. Now you need to update all these profiles, so open each profile on other tab - select update - cntrl F and search by 'PermissionSubscribeToLightningReports' - make this field to false - click update and it gets saved.
  9. repeat same process to all the profiles in the list
  10. do this in both the environments you using for deployment -> upload changeset -> deploy