All Collections
Troubleshooting
Salesforce validation errors
Resolving validation errors - "Test only deployment cannot update a field from a MasterDetail to Lookup"
Resolving validation errors - "Test only deployment cannot update a field from a MasterDetail to Lookup"

Validation error "Test only deployment cannot update a field from a MasterDetail to Lookup" was surfaced during a Validation

Quinn Kuiper avatar
Written by Quinn Kuiper
Updated over a week ago

Explanation of the error:

This Salesforce error that Gearset is surfacing is usually encountered when running a validation for a deployment package involving a change of a field that changes from a MasterDetail to Lookup.

This is because Salesforce does not support this change for Validations to avoid data loss or corruption.

Resolution:

To resolve this issue try deploying the package rather than validating it first. If you wish to test out the deployment, you can first deploy into another test sandbox, as a full deployment first includes a validation of the changes as part of the deployment procedure.

Further examples of this Salesforce validation error can be found here:

Disclaimer: This error is returned by Salesforce directly, rather than Gearset. Even so, we offer guidance based on our combined experience with the Metadata API. Where possible, we try to help guide you to fix or avoid this error. In the case that this isn't possible, we may need to direct you to Salesforce support for further clarification.

Did this answer your question?