I am currently attempting to update a new profile's permissions to match that of another profile (different license types, so cloning isn't available).
My current best solution is to pull various metadata types through SFDX along with the old and new profiles, copy the xml from the old profile to the new, and redeploy.
Only problem is, when I retrieve CustomObject and CustomField metadata, it only includes unpackaged objects/fields. I have a large managed package with many objects and customized levels of CRUD permissions, and I'm looking to update CRUD and FLS for those packaged objects and fields.
Is there a way to get managed package objects/fields in the profile metadata as well?
Here is my current package.xml:
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>*</members>
<name>CustomField</name>
</types>
<types>
<members>*</members>
<name>CustomObject</name>
</types>
<types>
<members>Commercial Lending Manager</members>
<members>Loan Closing</members>
<name>Profile</name>
</types>
<version>41.0</version>
</Package>
Best Answer
Yes, you can
DISCLAIMER :I am the author of the below mentioned module.
I had the similar problem few weeks ago and am able to resolve it using below module.
Hope this answer finds you. In case you are still looking for it.There a CLI which has a capability to retrive full profile xml along with CRUD and FLS. Written as a node module.Here are steps.
NOTE: this is a wrapper module which internally uses sfdx cli.
if you dont already have.
Type in
node -v
. to confirm you have it working .Run
npm install -g mydxcli
From Folder of your choice run the command.
Module Link: mydxcli
What the Module does internally :