Incomplete profile metadata retrieval

882 views
Skip to first unread message

jonathan.and...@gmail.com

unread,
Jan 18, 2018, 1:11:23 PM1/18/18
to Illuminated Cloud General Discussion
Hi,

My project uses package.xml for its metadata subscription and I'm using IC 2.0

My package.xml contains:

<types>
  <members>*</members>
  <members>Opportunity</members>
  <name>CustomObject</name>
</types>
....
<types>
<members>*</members>
<name>Profile</name>
</types>
....
<types>
<members>Opportunity.Receipt_Date__c</members>
<name>CustomField</name>
</types>


I'm using API 41.0 and I'm refreshing metadata for one of my profiles. However the .profile file that comes down from the org only contains login IP ranges and user permissions.

From the docs at https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/manifest_samples.htm I would expect this profile XML file to contain that profile's permissions for Opportunity.Receipt_Data__c field at least.

To be clear, I'm right-clicking the profile file in the project hierarchy view and from the context menu I go to Illuminated Cloud and then Refresh Metadata.

Clearly something is wrong, I'd be grateful for pointers on where this may be.

Thanks
Jonathan

sc...@illuminatedcloud.com

unread,
Jan 18, 2018, 1:15:21 PM1/18/18
to discu...@illuminatedcloud.com
Hi, Jonathan. Profiles and permission sets are....special. When you retrieve them, you also need to retrieve the other metadata that they authorize, e.g., objects/fields, classes/pages, etc., or they come back sparsely-populated based on the other items in the retrieval request. I recommend that you use Retrieve Metadata, select the profiles/permission sets and the things they authorize, then do a Retrieve for Merge and only copy the retrieved profiles/permission sets into your local project.

I should probably add this to the FAQ as it's not at all intuitive and it's just the way that these metadata types work when doing a metadata API retrieve.

Please let me know if that doesn't help you.

Regards,
Scott Wells

sc...@illuminatedcloud.com

unread,
Jan 18, 2018, 1:16:35 PM1/18/18
to Illuminated Cloud General Discussion
Oh, one other qualification since you showed your package.xml file. When you do a selective retrieval in IC, it doesn't use your full package.xml but rather a subset based on what you selected for retrieval/refresh. That's why it's coming back sparsely-populated even though your package.xml is complete.

Regards,
Scott

jonathan.and...@gmail.com

unread,
Jan 18, 2018, 1:23:24 PM1/18/18
to Illuminated Cloud General Discussion
Thank you Scott this not only makes sense, it also works!

An FAQ (with screenshots maybe?) would be a great idea. Hopefully this thread will be a pointer to anyone else having a similar issue in the meantime. 

Cheers
Jonathan

sc...@illuminatedcloud.com

unread,
Jan 18, 2018, 1:30:53 PM1/18/18
to Illuminated Cloud General Discussion
Glad to hear that did it! I'll definitely add this to the FAQ soon.

Regards,
Scott

Jap Hendy Wijaya

unread,
Oct 20, 2022, 11:06:14 AM10/20/22
to Illuminated Cloud General Discussion, sc...@illuminatedcloud.com
thank you, you're right, we need to pull the necessary metadata as well in the same .xml file
Reply all
Reply to author
Forward
0 new messages