1

How to validate a package xml using Metadata API? Similar to what we do with changesets. First we validate, then we deploy. If I need to validate a list of apex classes and vf pages, how can I do so using metadata API?

1 Answer 1

2

If you're using ANT, you need to set checkOnly=true in your build.xml file.

If you're using the sfdx tool with mdapi:deploy, you can pass the --checkonly flag:

https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference_force_mdapi.htm

If you're calling the Metadata API yourself, the DeployOptions on your deploy() call need to have checkOnly set to true:

https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy.htm

1
  • Yes, I was working with metadata APIs and the checkOnly = true works. Thanks! Mar 7, 2018 at 10:31

You must log in to answer this question.

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