0

I just started working with DX again. When deploying a DX project using the MDAPI to a production org, I get a lot of feature missing errors during the deploy. I have my set my default scratch org config to match my environment but I'm still having issues.

One regular example is the following:

Error  test_deploy/profiles/Admin.profile    Admin    Unknown user permission: EditPublicReports

Has anyone had any success with this? Has anyone here had a chance to play with the new org shapes feature that is in pilot? I assume that feature is in response to situations such as this.

1

I have found out that sdfx force:source:pull does overwrite the profile XML file, but it loses field level security and some other permissions, my solution was to add those manually to the profile XML.

I would suggest you perform a mdapi retrieve and a source pull and compare the resulting XML files.

More information can be found at: https://success.salesforce.com/issues_view?id=a1p3A000000nZCLQA2&title=sfdx-force-source-pull-loses-field-level-security

| improve this answer | |
0

If they are standard profiles like Admin, Standard or Customer support I typically do not include them during mdapi conversion .This can be done using the .forceignore file .

More details about .forceignore can be found here

A Sample .forceignore file would look like below

force-app/main/default/profiles/Custom%3A Marketing Profile.profile- 
  meta.xml

force-app/main/default/profiles/Custom%3A Sales Profile.profile-meta.xml

force-app/main/default/profiles/Custom%3A Support Profile.profile-meta.xml

force-app/main/default/layouts/Opportunity-Opportunity Layout.layout-meta.xml

Org Shape and Templates In DX

Currently in Pilot and if you are interested please reach though your AE .

| improve this answer | |
  • Ignoring the standard profiles, particularly System Admin, is not an option for me. We don't make any changes in production so system admin profile needs to be moved from scratch orgs to production on a regular basis. – BrBarr Nov 16 '18 at 18:16
  • System admins will have all the permissions by default . – Mohith Shrivastava Nov 16 '18 at 18:19
  • Agreed. But I get that error all the time. Here is another one from this morning. Error test_deploy_524/profiles/Admin.profile Admin Unknown user permission: EditReports – BrBarr Nov 16 '18 at 18:21
  • There is not lot one can do for these errors than script something to remove these tags or make sure to have a script that goes and checks few things on the other org where you are deploying – Mohith Shrivastava Nov 16 '18 at 18:23
  • Sandboxes are great choices as well than complete new scratch org now that DX supports non scratch orgs – Mohith Shrivastava Nov 16 '18 at 18:24

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.