I'm trying to create an unlocked package for objects, fields, layouts, tabs and couple of other metadata.

In order to make sure that there is no dependencies with other metadata out of my package, I tried to push everything to a scratch-org, I configured it good, did some adjustments manulley (eg: History tracking) and pushed the metadata, and after solving alot of problems it worked, and the metadata are now there.

Now, I'm trying to create a the package, and when I tried to create the version using the following command:

sfdx force:package:version:create --package base-objects --wait 20 -k MY_PASSWORD -f config/project-scratch-def.json

I get the same errors again, even though my scratch-org is the default (not default devhub but default scratch-org), so everything has to be tested there, right?

what I'm missing???

this is one error: Opportunity: The entity: Opportunity does not have history tracking enabled

Case-Case Layout: The ActionId specified was invalid for ActionType QuickAction.

Event-Event Layout: In field: QuickAction - no QuickAction named FeedItem.ContentNote found

PersonAccount.ER_Individual_Account_RT: Global value set 'SOMEFIELD__c' in record type 'Individual' on the entity 'Account' cannot be resolved

3 Answers 3


You need to specify all the dependencies in your metadata. Try using force:source:pull to get the metadata back from your Scratch Org. It should include all the manual changes you've made the org, thus fixing your package. Notably, in this case, your Opportunity.object-meta.xml file should be updated with the additional configuration (enabling field history tracking).

  • thanks for your reponse! I did actually add the dependencies and pull all the metadata again, but the errors are still there, even the history tracking with Account and Opportunity, I saw a known issue about that, there is letterly no solution for that yet!!! is that means, that I should remove the history tracking from the objects??? I'll post some other errors, maybe you could help. Thanks again!
    – Mo Hamada
    Commented May 20, 2020 at 6:35
  • As per this issue, (success.salesforce.com/issues_view?id=a1p3A0000018BX2QAM) known issue is fixed. If there is something not working as expected open a support ticket. Commented May 20, 2020 at 21:34
  • I saw someone else having this issue, he posted it here: success.salesforce.com/_ui/core/chatter/groups/… It doesn't look to be fixed yet! I will create a ticket though, thanks for the help!
    – Mo Hamada
    Commented May 22, 2020 at 5:08

Make sure you have the following

  • Audit history turned on in the scratch org as shown below

      "orgName": "Sample Org",
       "edition": "developer",
       "features": [
  • In your metadata definition file, you have history tracking captured for both object level and the field level

  • I am having the same issue with my managed package version I am getting "The entity: Account does not have history tracking enabled" error when i try to build my next version. I was able to build my 1st version without any error, but when I tried to build the 2nd version, I got this error. There is no change in schema/meta file in the 2nd version. Any thoughts? FYI: my code push is working fine in the new scratch org only issue is with new version creation. Commented May 8, 2022 at 10:18

I am facing similar issue when versioning a unlocked package, that has a custom field of an object from managed package. I get

 The entity: xxx__xxxxx__c does not have history tracking enabled

Did you got to solve package versioning problem?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .