trying to add SBQQ_Quote__c to Opportunity's related lists in my scratch org, no problem there using UI. i pull the code and confirm that the changes are in Opportunity-Opportunity Layout.layout-meta.xml.


when creating a new package version to be promoted and installed in our Production org I get this error. CPQ is installed in scratch and production orgs.

sfdx force:package:version:create --installationkeybypass --package XXXXXXXX --path force-app --wait 10

ERROR: Opportunity-Opportunity Layout: In field: relatedList - no CustomField named SBQQ__Quote__c.SBQQ__Opportunity2__c found.

that field does exist in the scratch org and in production

we are using apiVersion=44.0

saleforce support has not been helpful. i've been on the phone with Tier 3 support and they want to escalate it higher.

is this possible using sfdx?


At first glance, this seems like you aren't depending on the package. We went ahead and reproduced the problem, added the dependency, and it fixed it. In other words, this needs to be added to your sfdx-project.json

"dependencies": [{

"package": "04t Value"


See https://developer.salesforce.com/docs/atlas.en-us.sfdx_dev.meta/sfdx_dev/sfdx_dev2gp_config_file.htm

Honestly, this is a pretty basic feature of packaging and I'm surprised this took us so long to help.

  • that worked. will it matter that the 04t package in sfdx-project.json doesn't match production? i wasn't able to use the latest version of CPQ, just the one i was able to install in the scratch org – jcarey Mar 15 at 18:53

Did you try adding the field SBQQ__Quote__c.SBQQ__Opportunity2__c to the package and deploy? Include this as part of the fields SBQQ__Quote__c.SBQQ__Opportunity2__c and not just related list.

  • do you mean a package.xml file? our project doesn't have one. also, we're trying to avoid using the metadata api mdapi which is what we thought would require a package.xml. do you have an example of this? – jcarey Mar 6 at 18:55
  • Yes. You will have to include it in the package.xml using the CustomObject tag. Below is an example: success.salesforce.com/answers?id=9063A000000l2E9QAI I'm not sure how it works with SFDX but if the platform is complaining the field is required to be included in the package, then we need to include it in the package.xml You can verify this using any other tool like changeset or ANT. – varun guruvugari Mar 6 at 19:54
  • i created a package.xml file in manifest/package.xml with the contents <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> <types> <members>SBQQ__Quote__c</members> <name>CustomObject</name> </types> <types> <members>SBQQ__Quote__c.SBQQ__Opportunity2__c</members> <name>CustomField</name> </types> <version>44.0</version> </Package> but i still have the same error when running sfdx force:package:version:create... – jcarey Mar 6 at 23:50
  • I don’t see the package version create command in that script – jcarey Mar 7 at 0:52

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.