Mass Update Profiles in Salesforce

10:33 PM

We have 150+ profiles in our org. All we wanted to do was to turn off a TAB in all profiles. I thought it to be a simple task at first, but it was not.

Even though you could use the ANT tool to retrieve and deploy Profiles, there are some components which you cannot access using the ANT tool. So, we finally ended up manually editing all Profiles. Anyhow, in this post i would be showing the steps to mass update Profiles. You may be successful depending on what you deploy or retrieve.

STEP 1: First of all, you will need to have the ANT tool Installed. If you haven't installed it yet, you can have a look here.

STEP 2: After having installed the ANT tool you will have to prepare the XML file to retrieve profile information. Here is a sample of the XML file.


<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
    <types>
        <members>*</members>
        <name>CustomTab</name>
    </types>
    <types>
        <members>*</members>
        <name>Profile</name>
    </types>
    <version>20.0</version>
</Package>

STEP 3: Use the above XML for retrieveUnpackaged. The result will be two folders one for Profile and one for Tabs. The Profile Folder will contain one file for each profile and each file will contain the custom tab settings for that profile.

To retrieve information other than TABS you may also use other types like "CustomApplication" to retrieve the security settings of Custom Applications for every profile. The more types you add, the more information is retrieved for every profile.

0 comments