I'm developing a managed package and I have a test EE org provisioned from the partner portal. I made an update to a profile there and when I pulled down the latest metadata all of my apex class and VF page permissions were gone.

Is this something new? Where is this info stored if not in the profile? I double checked the profile in SF and all of the Class/VF permissions are still there when viewing the profile in SF just not in the metadata.

  • 3
    I think Profile XML is somewhat dynamic. It pulls info about class/page permissions only if you pull them too (same for cust. objects). Can you post (maybe bit redacted) your package.xml? – eyescream Jan 23 '14 at 15:53
  • 1
    Yes i think this is the case, you need to pull down the pages and objects in the same request. I also found a note in the metadata api about this working for managed only from API 29.0, so it may also depend on what version (and thus what tool) your using. salesforce.com/us/developer/docs/api_meta/Content/…. – Andrew Fawcett Jan 23 '14 at 16:11
  • 1
    @AndrewFawcett and eyescream thats what it was! I was only requesting the latest for the .profile, once I added a .object or .page it was including the relevant XML. Seems pretty odd to me but thats how it works. Thanks! – Phil B Jan 23 '14 at 16:46
  • @eyescream Want to do the honours? :) – Andrew Fawcett Jan 23 '14 at 18:04
  • Bah ;) Phil, make your own answer & accept, I'll happily throw the +1 there. – eyescream Jan 23 '14 at 18:14

The Profile XML is dynamic.


"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."

Ex. just doing a refresh from server(RetrieveRequest) in Eclipse or MM on the .profile file results in only high level details being returned. If you also include a .object in the request the Profile will include the details relevant to that object as well.

  • It's also worth noting that objects behave the same way. They only retrieve what you ask them to retrieve. Pulling a customfield will pull very basic xml for the object and then your custom field(s). – drakored Jan 23 '14 at 20:38

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.