I have one class where contact MailingCountryCode and account BillingCountryCode is used. I have added both objects in project but still I am getting error while versioning the package. Error message>>

ERROR at Row:1:Column:8 No such column 'BillingCountryCode' on entity 'Account'

Need help to resolve the issue.


You need to ensure that your scratch org definition file both

  • uses the correct configuration for a scratch org that includes the features required by your code:

    "features": ["StateAndCountryPicklist"],
  • and is properly specified at the time of package version creation:

    sfdx force:package:version:create --package "MyApp" --definitionfile config/project-scratch-def.json --wait 10

If you don't specify the configuration file for version creation, your deployment to the version scratch org will fail.

| improve this answer | |

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.