Administration
Salesforce Deployments Interview Questions and Answers Experienced
1. What are the main deployment tools available in Salesforce?
Change Sets, Metadata API (via Ant or VS Code), Salesforce CLI (SFDX), DevOps Center, Unlocked Packages, and 3rd-party tools like Gearset, Copado, AutoRABIT.
2. What is a Change Set and its limitations?
A Change Set is a native Salesforce tool used for deploying metadata between connected orgs. Limitations: No support for some metadata types, cannot deploy profiles fully, no rollback, no support for version control.
3. How does Metadata API deployment differ from Change Sets?
Metadata API supports scripted deployments (via Ant, SFDX, or VS Code), allows deployment between unconnected orgs, supports source control, and offers better error reporting and automation.
4. What is the role of Salesforce CLI (SFDX) in deployment?
SFDX provides command-line tools for deploying, retrieving, and managing metadata. It supports source-driven development, version control, scratch orgs, and CI/CD automation.
5. What are Unlocked Packages?
Unlocked Packages are modular units of deployment and versioned metadata built using SFDX. Ideal for enterprise CI/CD and scalable app delivery.
6. What is the purpose of DevOps Center?
DevOps Center is Salesforce’s point-and-click interface for managing deployments with version control integration (Git), pipelines, and environments.
7. How do you deploy Profiles in Salesforce?
Use Metadata API with full profile XML or split them using SFDX for better control. Change Sets often don't capture full profile settings.
8. How do you handle deployment dependencies?
By including referenced metadata (e.g., fields, objects, permission sets) in the same deployment or pre-deploying dependencies manually.
9. How can you deploy Flows using VS Code?
Retrieve the Flow metadata via SFDX or Package.xml, and deploy using `sfdx force:source:deploy` or Metadata API commands.
10. What is destructiveChanges.xml used for?
It is used in Metadata API deployments to delete components like Apex classes, triggers, fields, etc., during deployment.
11. What is the difference between source format and metadata format in VS Code?
Source format is modular (used in scratch orgs), while metadata format is monolithic and used in org-based deployments (like Ant or Change Sets).
12. How do you rollback a failed deployment?
Salesforce doesn’t support automatic rollback. Manual rollback involves deploying a previous version or using source control to revert changes.
13. How can you deploy data along with metadata?
Use tools like Data Loader or Salesforce CLI for data. Metadata tools deploy structure; data migration must be handled separately.
14. What are common metadata types that cannot be deployed using Change Sets?
Standard Picklist Values, Email Templates in Classic folders, Custom Settings data, Reports and Dashboards (partial support).
15. How do you handle deployment of Permission Sets?
Deploy via Metadata API or VS Code. Be sure to include referenced objects, fields, and Apex classes in deployment.
16. How do you track what metadata was deployed?
Use Deployment Status in Salesforce UI, SFDX logs, Git commit logs, or third-party tools with audit history.
17. What is the importance of Package.xml?
It defines what metadata components are retrieved or deployed using Metadata API or Ant. It acts as a manifest file.
18. Can you automate Salesforce deployments?
Yes, using Jenkins, GitHub Actions, Azure DevOps, or GitLab pipelines with Salesforce CLI and script-based deployment flows.
19. What is a validation-only deployment?
A dry-run deployment that runs tests and checks metadata conflicts without committing changes. Useful for pre-checks.
20. How do you deploy Lightning Web Components?
Retrieve using SFDX or VS Code, and deploy via `sfdx force:source:deploy`. Ensure component bundle is complete.
21. What is testLevel in Metadata API deployment?
Specifies which Apex tests to run. Values: NoTestRun, RunSpecifiedTests, RunLocalTests, RunAllTestsInOrg.
22. What are pre- and post-deployment steps you usually follow?
Pre: Validate metadata, backups, freeze critical updates. Post: Regression testing, data updates, enable features.
23. Can we deploy standard picklist values?
Not via Change Sets. Use Metadata API (StandardValueSet) or manual update in the target org.
24. How to deploy Reports and Dashboards?
Use Metadata API or include them in Change Sets. Classic folders often require manual recreation.
25. What are the benefits of source-driven development?
Version control, better team collaboration, rollback capability, automation, audit trail, and modular deployments.
26. What is the difference between Git and Change Sets?
Git is a version control system used for source management and CI/CD. Change Sets are manual deployment tools without versioning.
27. How do you deal with field-level security during deployment?
Use Permission Sets or include FLS in Profile metadata. Always validate post-deployment access.
28. What are some 3rd-party tools used for deployment?
Gearset, Copado, AutoRABIT, Flosum, ClickDeploy – offer CI/CD pipelines, monitoring, and version control integration.
29. What is the difference between Full Sandbox and Partial Copy for deployments?
Full Sandbox includes complete data; Partial includes selected data. Choose based on test case and deployment needs.
30. Can deployment cause Apex test failures? How do you handle it?
Yes. Analyze logs, fix dependency issues, or run only specific tests using testLevel during deployment.