0

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?

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

|improve this answer|||||
  • Yes, I was working with metadata APIs and the checkOnly = true works. Thanks! – Nilesh Mangalhara Mar 7 '18 at 10:31

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.