DEVELOPMENT-LIFECYCLE-AND-DEPLOYMENT-ARCHITECT practice question 26 of 30

Universal Containers (UC) has a recruiting application using Metadata API version 35, and deployed it in production last year. The current Salesforce…

Full set: 227 questions
Universal Containers (UC) has a recruiting application using Metadata API version 35, and deployed it in production last year. The current Salesforce platform is running on API version 36.A new field has been introduced on the object Apex page in API version 36. A UC developer has developed a new Apex page that contains the new field and is trying to deploy the page using the previous deployment script that uses API version 35. What will happen during the deployment?
Answer options
A: The deployment script will pass because the new field is backward compatible with the previous API version 35.
B: The deployment script will fail because the new field is not known for the previous API version 35. Correct answer
C: The deployment script will pass because the new field is supported on the current platform version.
D: The deployment script will fail because the platform doesn't support the previous API version 35.
Correct Answer:
B. The deployment script will fail because the new field is not known for the previous API version 35.
Explanation

The Metadata API validates deployment packages against the API version specified in the request, not the version of the destination org. The new field was introduced in API version 36. Since the deployment script specifies version 35, the validation service checks the Apex page's metadata against the schema of version 35. In that version, the new field does not exist, causing a validation error and failing the deployment. The component is considered invalid for the specified API version.

Why Incorrect

A. New features in a later API version are not backward-compatible; older API versions are unaware of them.
C. The platform's current version is irrelevant; the deployment is validated against the API version specified in the deployment package/script.
D. The Salesforce platform maintains support for many previous API versions to ensure backward compatibility for existing integrations.

References

1. Salesforce Metadata API Developer Guide. "Introduction to Metadata API," section on "API Versioning." "When you deploy changes... the components are processed according to the behavior of the specified version... If you’re trying to deploy a component that was introduced in a later API version than the version you’re using for the deployment, the deployment fails."

2. Salesforce Metadata API Developer Guide. "deploy() Call," section on "DeployOptions." The documentation specifies that the API version used for the deployment determines the set of valid components and attributes.

Scroll to Top