4

I'm looking for a paid tool or open source project that validates a zipped package locally before attempting to deploy it to a salesforce sandbox or production environment.

By validation I mean to validate the metadata consistency in a specific deployment. As an example, I want to be able to validate that for all translations in the translation file, there exist corresponding custom labels in the custom labels file. Other examples could be apex code referencing fields in the model or layout referencing fields.

The reason for this request is to left-shift deployment issues, in order to tackle them sooner and closer to the point in time where you create the deployment.

0

There's really no good way to do that offline, because the validation may depend on metadata in the org. For example, given this code:

public class Foobar extends BarBaz {
}

Can you tell me if this code will validate in my org? Will it validate in yours? Will it validate in another, older sandbox?

Probably the best way that you could help validate this "pre-deployment" would be to create a 2GP (Second Generation Package) via Salesforce DX. As I understand it, a 2GP creates an installable package that can either stand alone or with dependencies. You can use this as a form of validation that the package you're deploying is valid, because either it will create the package, or give you a list of missing dependencies.

  • I guess I could use 2GP to validate. I'll look into that. But I think it is somewhat of a hack, and not really the intended use of 2GP, so I'll keep the question unanswered for a bit. – Andreas86 Mar 13 '18 at 18:08
  • As for your other point about the context of the deployment being crucial, the idea is that if the deployment is valid within it self, the context almost doesn't matter. – Andreas86 Mar 13 '18 at 18:10
  • @Andreas86 That's a good point. I don't know of any such tool that can internally self-validate without hitting the server. Hopefully someone knows of something. – sfdcfox Mar 13 '18 at 18:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.