1

I'm working on publishing a Unlocked Package. I am using a developer org as a devhub and devloping using SFDX, VS Code, Scratch Orgs, etc... I am able to package the code without a problem, but when attempting to install it on another org (Internal Org) I am getting the following error:

Encountered errors installing the package!,Installation errors: 
1) (Demo_Component_Manager) In field: object - no CustomObject named DandBCompany found, Details: Demo_Component_Manager: In field: object - no CustomObject named DandBCompany found

This is referring to the Permission Set, which does not reference DandBCompany. The destination org does not have DandBCompany.

Component Package Manager Repo

When I originally deployed the Unlocked Package, there was a DandBCompany permission in the permission set, but that has since been removed. I have searched for any references of DandB in my project and found none (other than in the .sfdx folder that tracks all the objects in the Scratch org). I don't know why this is happening.

  • 1
    Do you have the related permissions enabled in your Scratch Org Configuration File? This would cause the problem, even if you have no actual references in your Permission Set. – sfdcfox Oct 20 at 2:57
  • @sfdcfox - When I first created the package, I had a permission in my permission set, but it was wiped. I couldn't find any other references to DandB (D&B) in my code. – David Larrimore Oct 20 at 10:18
2

Ok, here is the deal. Since My component is using the Tooling API, my permission set had "View All Data" permission. While my permission set did not have anything specific to DandBCompany in it, the SFDX Packaging command clearly takes objects into account when packaging things up. It was automatically adding permissions to objects that the destination org did not have.

TLDR: Don't include "View All Data" permission in your permission set. It comes with a lot of baggage.

| improve this answer | |
0

Like sfdcfox said, you are not having DataComDnbAccounts &/or DataComFullClean in your config file.

Here - https://github.com/davidlarrimore/gpbu-component-package-manager/blob/master/config/project-scratch-def.json

Please check documentation on the same - https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev_scratch_orgs_def_file_config_values.htm#so_datacomdnbaccounts

Also make sure that you give that config file as a parameter while creating the package. Then it'll work smooth.

| improve this answer | |
  • I don't want anything related to data.com in my package. Thats the problem. I'm not using data.com, but somehow DandBCompany is still being referenced when it is packaged. – David Larrimore Oct 20 at 9:38
  • Can you search is there any related metadata is being used in your folder/profile – Ysr Shk Oct 20 at 9:39
  • I have tried using the scratch-def when deploying the package and that did not help – David Larrimore Oct 20 at 10:03
  • When I originally deployed the package their was a permission set item related to D&B (DandBCompany) that has since been removed. – David Larrimore Oct 20 at 10:05

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.