0

I would appreciate some pointers at what is wrong with the following.

I am deploying a VFP and an Apex class in to production using change sets, but the profile settings keep getting lost.

On the production box, before deployment happens, the VFP has "Support Engineer" and "Support Leadership" in the enabled profiles, I checked these via "Setup | Develop | Visualforce Pages | [My VFP] | security".

On the dev box I create an outbound change set that as "Support Engineer" and "Support Leadership" listed in the "Profile Settings For Included Components" section as well as the updated VFP and class.

The change is uploaded to production.

On the production server the change is successfully validated and deployed but when I revisit "Setup | Develop | Visualforce Pages | [My VFP] | security" the "Enabled profiles" list is empty and I have to add them in manually.

What am I doing wrong? How should I deploy access rights to my page and class?

5

In order to deploy permissions with a changes you have to have BOTH of the following:

  1. Profile included in the chageset
  2. The items related to the permissions being deployed.

For #2 in your case you need to ensure the VFP / classes are in the changes as well.

https://help.salesforce.com/apex/HTViewHelpDoc?id=changesets_perm_sets_profiles.htm&language=en_US

For custom object permissions, custom field permissions, Visualforce page access, and Apex class access, always include supporting components in the change set. For example, object permissions for the custom object Items are included only if the Items object is also included

  • Also objects if needed – raym0nd Aug 22 '16 at 14:23
  • @raym0nd - Yes, but OP is not asking about Objects so I narrowed the focus to the OP question – Eric Aug 22 '16 at 14:24
0

Thanks very much for the pointers, they got me where I need to be.

The problem was that I was not setting the access rights on the Apex class in the "Change Set" page.

For those that come after me with this problem the steps you need are:

Once you have added your Apex classes to the change set, look in the "Change Set Components" section and for each Apex class click on the name. In the next page click on the [Security] button, this brings up all the profiles in the "Available Profiles" list and all the ones that can access you class in the "Enabled Profiles" list.

Move those profiles across in the usual manner and save the changes. Once you have assigned access as required you can deploy the change set and the logins with the assigned profiles will be able to run your code.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.