We are working in SFDX and we created several scratch org with "FieldAuditTrail" active so we could increase the number of fields under history. However, when we try to create a package via the sfdx CLI it fails with

exceeded the allowed number of fields to track on a given entity

We correctly configured the project-scratch-def.json for scratch org, how do we specify package requirements?

1 Answer 1


You can specify a definition file in your sfdx-project.json file (using the definitionFile property) or pass in a path to one with the --definitionfile flag when you run the command to create your package version. The definition file has the same structure as a scratch org definition to specify the features/settings required by your package.

There's more info on the Unlocked Packages page in the developer guide:

A reference to an external .json file used to specify the features and org settings required for the metadata of your package, such as the scratch org definition. Example: "definitionFile": "config/project-scratch-def.json",


You must log in to answer this question.

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