2

General User Permission on profile not updating (Import Personal Contacts) I have all profiles, custom permissions, permission sets, added to the repo as well as leads, accounts, contacts.

After deployment, the destination org always has Import Personal Contacts set to true, even though the source has it set to false.

What am I missing from the package that would contain that permission?

  • 1
    That sounds about right - I've just tested this between a couple of scratch orgs and can successfully set import personal contacts to false via the metadata API. Package.xml for deployment just included the profile, and the profile body just contained the following: <userPermissions> <enabled>false</enabled> <name>ImportPersonal</name> </userPermissions>. What does your package.xml + profile body look like in your package? – mpd106 Apr 25 '18 at 15:34
  • How were you able to get that permission to show up in the xml file, when I do an ant retrieve the permission isn't showing up? – user6205497 Apr 25 '18 at 18:15
  • Ah, sorry, when you retrieve a profile the items set to false aren't returned by the metadata API, I guess because the xml would end up pretty vast in a lot of cases. I generated the above using a third-party tool that I work on, which automatically handles that case, so in order to migrate changes like that via the metadata API yourself you'd need to use a similar third-party tool, or hand-roll the permissions that you want to set to false in the deploy package. It is possible to do a deployment via the API that sets user permissions to false though! :) – mpd106 Apr 26 '18 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.