Deploy profile metadata changes easily with simple Python script

Moving profile changes to Salesforce environments is a difficult/irritating/troublesome task. This post helps to make developer's life easier when deploying profile changes.Let me explain you with a business scenario.

Business Scenario:
Universal Containers is using Salesforce Platform for their business automation. They have different sandboxes for development teams. They use Tortoise SVN (Subversion) for version control.  Developers check-in their code, metadata(profiles, objects, layouts etc) to SVN. As continuous integration is setup in their organisation, checking into SVN automatically deploys the changes to sandboxes.

Problem:
Universal Containers have around 90 profiles in their Salesforce environment. Developers have to update the metadata files of all profiles whenever there is a new field created which is time consuming.

Solution:
We are going to create a Python script which copies the profile permissions to all the profiles. For example, consider the below field permission have to be deployed to all the profiles.
You can include all the common permissions in this file, ProfilePermission.txt.

The below code snippet copies the permissions in ProfilePermission.txt to all the profiles.
Install Python and execute script:
Click here to know how to install and set up python.
Once you are done with setup, double click on the CopyProfilePermission.py file to execute the script. Woohoo!! we are done with the setup and execution.

Comments

Popular posts from this blog

New Beta Architect Certifications by Salesforce