Skip to main content

With the use of a manifest file (package.xml) to deploy from repo to Salesforce org, how are people deploying the entire repo/code? The maximum allowed limits are exceeded when the manifest contains all of our components. 

Example scenario: when need to "restore" all of an Org from the repo.

If deploying via a manifest file that contains everything does not work, what other approaches are people using for the example scenario?

Thanks!

 

#Sales Cloud  #Salesforce Developer  #Service Cloud

2 Antworten
  1. 4. Nov. 2023, 01:05

    When deploying a large volume of components from a Salesforce repository to an org, you might encounter limitations due to the maximum allowed limits for metadata components in Salesforce deployments. If deploying everything via a single manifest file exceeds these limits, there are alternative approaches you can consider for scenarios like restoring an entire org from a repository:

    1. **Divide and Conquer:** Instead of deploying everything in a single deployment, divide your metadata components into smaller logical groups. Create multiple smaller manifest files, each containing a subset of the components. This way, you can deploy these smaller packages sequentially, avoiding the limits.

    2. **Use Salesforce DX:** Salesforce DX is a set of tools and features that facilitate modern software development practices for building Salesforce apps. It allows you to work with your source-controlled Salesforce code in a more modular and organized way. You can use Salesforce DX commands like `force:source:push` to deploy source to your org. DX also supports scratch orgs, which are disposable orgs specifically designed for development and testing.

    3. **Leverage Metadata API Asynchronous Deployment:** Metadata API allows asynchronous deployments. You can use tools or scripts to deploy metadata asynchronously, allowing Salesforce to process the deployment in the background. This approach can handle large deployments more effectively.

    4. **Implement Continuous Integration/Continuous Deployment (CI/CD):** Set up a CI/CD pipeline that automatically deploys changes to your org when code is committed to the repository. CI/CD tools like Jenkins, GitLab CI, or GitHub Actions can help automate the deployment process and manage large codebases more efficiently.

    5. **Optimize Your Metadata:** Review your metadata components and identify if there are any unnecessary or redundant components that can be removed. Reducing the number of components can help you stay within the deployment limits.

    6. **Consider Salesforce Packages:** If your repository contains reusable components, consider packaging them as managed or unmanaged packages. Packages can be versioned and deployed independently, making it easier to manage deployments.

    By adopting a combination of these strategies and tools, you can handle large deployments more effectively and avoid hitting the maximum allowed limits when restoring an entire org from a repository. Choose the approach that best fits your requirements and the complexity of your Salesforce implementation.

0/9000