function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Michael SchröderMichael Schröder 

Deploy meta data to scratch org fails

Hi,

I am working on a Community in a sandbox. To develop LWCs, I wanted to push the sandbox source/metadata to a scratch org and start the SFDX local development server.

However, it is unclear to me how to actually sync my scratch org with the sandbox. 

I have tried pushing the source directly, but recieved a long list of errors.

I then tried to convert the metadata into DX format and deploy it to the scratch org (from: https://salesforce.stackexchange.com/questions/213190/extract-custom-object-from-sandbox-into-scratch-org-and-version-control-system), but again all I got was a long list of errors:

`Invalid type: cxsrec__cxsJob_application__c`
`DML requires SObject or SObject list type:`

Now I'm a bit clueless. Is it possible at all to push a sandbox state to a scratch org?

 

Michael SchröderMichael Schröder

Or are we still at this point? 

"I attended a webinar about salesforce DX hosted by the salesforce dev team. They addresses these concerns by stating that we shouldn't be converting our whole org to one salesforce DX project, and should break it down into modules. I don't think this is realistic to be able to do for most developers who have existing orgs to maintain, who already have ALL of the metadata for one org pulled down using the metadata API. My guess is that the deployment tool is still not fully baked and can't determine what all of the local dependencies are when publishing  a deployment from DX format which is why we see these errors time and time again. If the salesforce dev team can make the tool smart enough to determine dependencies and deploy those items in the correct order then these issues would go away IMO."

From: https://developer.salesforce.com/forums/?id=9060G0000005OqbQAE