Can we deploy only profiles from one sandbox to another?



You can absolutely deploy profiles and permission sets safely, provided you keep a few things in your mind:

1) Profiles work like junction objects when retrieving them from salesforce. In other words, if you ask for the Admin profile and include Account and Opportunity in the retrieve, the Admin profile XML will contain ObjectPermissions, FLS, RecordType Visibility for these two objects and UserPermissions only. No Class Access, Page Access etc because you did not request them in the retrieve. So... if you migrate this Profile XML over, obviously you will not get desired results.

2) Profiles merge on the server. In other words, if you have Object Permission for X set to RWD and you migrate the updated Object Permission for X, it will override existing permissions. But, as part of that migration, if you add Object Permission for Y, it will be added on as well.

3) Profiles are never created in Salesforce. Let me clarify... they are never created; they are cloned and then overridden. So, if you are creating a Profile using the API, you are essentially cloning the PlatformUser profile or StandardUser profile (depending on license type) and then overriding it. There might be artifacts of that Profile in your new Profile.

4) Some Profile sections, like AppVisibility and TabVisibility indicate negative values by absence. This is the most dangerous aspect of Profiles that deserves most scrutiny. Try this: Retrieve the profile XML along with CustomTabs. Back that up. Now, change the TabVisibility for your favorite tab to Hidden. Now, re-retrieve your XML. Execute a compare between your Profile XML. You will see that the TabVisibility is missing in your second retrieve. So, if you migrate that to another Org (sandbox or production), you are not going to turn off the Tab as expected because the XML is missing (remember that Profile XML merge).

As long as these basic rules are kept in mind, you are absolutely ready to migrate profiles or permsets anywhere you want. It seems daunting but it is not that bad.

Contact me if you want more info or talk a bit more about this: sridhar at dreamfactory dot com (Warning: We make the SnapShot Change and Release Management tool so you might get a 2 min sales pitch when you call me :-) ).

Good luck!

| improve this answer | |

You can deploy profiles between instances. Deploying profiles can be scary because small changes tend to occur during testing/development. You may accidentally deploy a change set unintentionally granting additional access to a specific profile. Check out this post. What is the best way to deploy profiles in Salesforce? (especially system admin)

| improve this answer | |

I think Yes, not completely sure though. You can get the XML version of Profiles from Eclipse IDe and then you can deploy the same after making required changes.

| improve this answer | |

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.