Creating Scratch Org results in error

scratch-orgvs-codevscode-dx

  • Created a scratch org in VSCode.
  • Trying to push source to default scratch org results in the following errors:
  1. The global picklist cannot be resolved
  2. Global value set cannot be resolved
  3. In field: columns – no CustomField named "xyz" found
  4. Field does not exist – check spelling

There are few more errors, but I am not listing them all here.

What is the cause of these errors and what can be done to resolve them?

Best Answer

You're missing metadata, specifically a GlobalValueSet. The other related errors are cascading errors from the fact you're missing one or more files. Make sure you retrieve the GVS, then try deploying again.

sfdx force:source:retrieve -m GlobalValueSet:ValueSetName -u sourceOrg
sfdx force:source:push
Related Topic