0

Lets assume that I created an object in DEV, several permissions respect to that object were set -not necessarily by me- and now this object is deployed to production. If I want to retrieve all the information like field permissions, accessibility ones, etc etc, I know that information will be in the profiles and in the permissionSets folder. What I don't know is all the xml element types used to specify this information. Does anyone know this? What could be the case for classes?

3

You can find the appropriate values in the Profile object. The XML looks like:

<Profile ...>
    <classAccesses>
        <apexClass>MyClass</apexClass>
        <enabled>true</enabled>
    </classAccesses>
</Profile>

You can get the values currently in production with a package.xml file that looks like:

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

When you retrieve a profile, permissions for other items in the package.xml are also retrieved for the specified profiles.

0

In Eclipse IDE, Right click on your project folder -> Hover over the "Force.com" menu -> Select Add/Remove Metadata Components -> Click on the Add/Remove button -> Click the "Refresh" Icon, then uncheck and recheck the folders you want in your project.

You can also try to extract ALL the classes by using the '*' in the package.xml file.

<types>
<member>*</member>
<name>ApexClass</name>
</types>

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.