7

For Push and Deploy Lightning Web Component Files module of Lightning Web Components basics, when I try to deploy from the scratch org to Dev org, it gives me the following error :

Cannot update a field to a Lookup, MasterDetail, or Hierarchy from something else (44:13)

for the project path : force-app\main\default\objects\Case\fields\Product__c.field-meta.xml

enter image description here

It's a new trailhead playground that I created, so the initial config for both scratch and dev orgs must be same. And therefore, if it works in scratch org, then ideally the deployment should not fail.

Any pointers?

1 Answer 1

11

A playground is more like a devOrg than a scratch org - it has some included metadata. This specific issue is covered in the instructions:

  1. In Setup, under Object Manager, delete the custom Product picklist field from the Case object.

DevOrgs (and TH playgrounds) come with a Case.Product__c field that is a picklist. The E-Bikes app has a field with the same API name on Case, but it is a lookup. You have to delete the picklist before the Lookup will deploy.

You must log in to answer this question.

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