You need to sign in to do that
Don't have an account?
Daniel Chirinos 6
Using sfdx source to retrieve profiles inconsistent result
Hello, I'm using salesforce cli to run basically "sfdx force:source:retrieve -m Profile:Admin", which I know technically sfdx is not that much compatible with profiles but, on a sandbox on a project, I got the object permissions and all that, but running that command on other sandboxes and my developer org brings only the user permissions, is that related to some org config or something? I'd love to know because I kinda like to use sfdx source for all I can.
Thanks in advance, hope someone can help me out on this
To retrieve specific profiles you can always use the sfdx command source:retrieve as follows:
sfdx force:source:retrieve -m "Profile:My Profile, Profile: AnotherProfile"
However, the metadata or setting for profile in different org could be different and so is the behavior you see.
Please refer to the standard documentation here:
https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_source.htm
Hope above information helps. Please mark as Best Answer so that it can help others in future.
Thanks.
Yeah but like the main difference in my issue is not that the metadata should be exactly same, but that it brings different "sections" so to speak, retrieving Profile in one sandbox retrieves ObjectPermission tag(with the objects of that sandbox), and doing so in another one, does not even bring the tag, so I'm curious as I'm sure is a sandbox thing but don't know what.
Hi Daniel,
Just curious to know how were you able to retrieve all references of profiles using sfdx, I have been trying this since long and ending up doing it manually.