[SalesForce] Are profile and permission set metadata files getting all project objectPermissions

I have a project in development. There about 45 new SObjects to the org but there is also a couple of new profiles for the org. The permissions on several existing SObjects have been specifically setup for these new profiles.

Now I need to migrate these changes to the test sandbox. In this case, there is a large amount of code and configuration changes to be deployed as part of the effort. Because of this, the decision was made to utilize the SFDC ANT migration tool to migrate these changes instead of SFDC Change Sets. Since we are using MavensMate and Force.com IDE as our code editors, the package.xml for the project elements can be maintained easily.

In my case, I have a total of 108 SObjects setup in my package.xml. The reason for this was grab all of the objects (new or old) where we have have made some sort of object permission level change to the new profiles.

Here is the issue. The metadata extracted from the development org for the profiles only has a random number of entries in it. It does not have the complete list of SObjects. The permission sets also have a random list of tags and it does not appear to be consistent between various profiles or permission sets.

I have even tried using the ANT Force.com Migration Tool's sf:retrieve target but the results are the same.

Has anyone seen this behavior before?

Is this a bug or is there some obscure rule in the Metadata API / Tooling API that is driving this behavior?

Any suggestions on how to correct / workaround this issue?

Thanks for all the help.

Cheers!

John

Best Answer

this is not a solution, just a comment, as I do not have enough reputation to post comments.

When you retrieve profiles, does you package.xml also include relevant objects? The reason for this question is that retrieving Profiles only works properly when you specify objects and fields in the same request. i.e. if you retrieve objects first, and then profiles then you will not get full profile information. See "fields" section here: http://www.salesforce.com/us/developer/docs/api_meta/Content/meta_profile.htm#heading_2_

The content of a profile returned by Metadata API depends on the content requested in the RetrieveRequest message. For example, profiles only include field-level security for fields included in custom objects returned in the same RetrieveRequest as the profiles

Related Topic