[SalesForce] Error while deployment through SFDX

I took the complete org backup from one org and trying to deploy it in another org. While deployment through the SFDX, I am getting the following errors:

  1. Invalid fullName, must end in a custom suffix ( for ex. __c ).
  2. Could not resolve standard field's name.
  3. Property 'pageTemplate' not valid in version 45.0
  4. Cannot create a new component with the namespace: LID. Only components in the same namespace as the organization can be created through the API.
  5. field integrity exception: unknown (Case access level below organization default)

How to resolve these errors..

Best Answer

Pulling all the metadata from one org and putting it into another one is always a tricky process. That you're doing it with SFDX isn't all that relevant. For your errors 1 & 2, there's not enough information - what object was referenced? For 2, what specific field? In both cases, does the object already exist in the target org?

For 3, it seems your metadata was pulled from the source org using API version 33.0-38.0. pageTemplate is deprecated in flexiPages from API 39.0 forward.

For 4, it sounds like you have metadata from managed packages in your extract from your source org. That metadata can not be deployed directly. You can modify certain pieces of metadata in managed packages, but you can't install the package by just deploying its metadata into an org. You'll need to remove most or all of that metadata from your source before deploying. You can install the packages in the target org through the AppExchange, or with the sfdx force:package:install command.

Item 5 indicates that there is a mismatch in Org-Wide Defaults for the sharing of Cases between the source and target orgs.

Related Topic