Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Salesforce
  3. Question
Salesforce

How to deploy a custom app using the salesforce package xml?

Asked by Augustina Fuentes May 24, 2024 6.3K views 5 answers
Share

About this question

I work on a project that consists of a Lightning App including two Lightning Component Tabs. I needed to deploy it to another org and continue working. I retrieved all necessary components using package.xml and deployed it to target org. Deployment went without errors.

When I open my app, I see empty space and a "No items" tab. I entered Lightning App Builder -> App settings -> User profiles and added System administrator. Nothing changed.

What else should I do to have it working?


    
        *
        StaticResource
    
    
        *
        CustomApplication
    
    
        *
        ApexClass
    
    
        *
        ApexPage
    
    
        *
        CustomField
    
    
        *
        CustomMetadata
    
    
        *
        CustomObject
    
    
        *
        CustomTab
    
    
        *
        FlexiPage
    
    
        *
        LightningComponentBundle
    
    54.0

Your answer

5 Answers

Ranjana Admin JanBask Expert Latest answer

Answered on Mar 4, 2025

Deploying a custom app in Salesforce using package.xml requires the Metadata API and ANT Migration Tool. Here’s a step-by-step guide to get it done smoothly:

1. Install the Required Tools

  • Download and install Salesforce ANT Migration Tool.
  • Ensure you have Java JDK installed.

2. Retrieve the Metadata Components

First, create a package.xml file listing the metadata (Apex classes, objects, pages, etc.).

Example package.xml:



    
        MyCustomApp
        CustomApplication
    
    
        MyApexClass
        ApexClass
    
    58.0

Save this file inside the src folder of your project.

3. Retrieve the Components from Source Org

Use the following command in your terminal:

  ant retrieveUnpackaged

This pulls metadata from Salesforce into your local project.

4. Deploy to Target Org

  • Modify the build.properties file with your org credentials.
  • Run the deployment command:

  ant deployUnpackaged

If there are errors, Salesforce will provide a log of issues.

5. Verify Deployment

  • Log into your target Salesforce org and check if the custom app and components are available.
  • Pro Tips: ✔ Use sandbox for testing before deploying to production.

✔ Always take a backup before making changes.

✔ Use Salesforce CLI (sfdx) for modern and efficient deployment.


Was this helpful?

Pedroahmed

Answered on Nov 20, 2024

Leverage the power of mobile with a dedicated Mobile App Startup Consultant. They guide you through every phase of development, from design to deployment, ensuring your app aligns with industry standards and user expectations. Their expertise is key to creating high-performing, user-friendly apps.


Was this helpful?

Jesse Holt

Answered on May 29, 2023

Stellen Sie sicher, dass Sie die folgenden Komponenten in Ihre package.xml aufgenommen haben: StaticResource, Custom Application, ApexClass, ApexPage, CustomField, CustomMetadata, Custom Object, CustomTab, und FlexiPage. Stellen Sie außerdem sicher, dass Ihre Salesforce-Version 54.0 oder höher ist. Wenn alle diese Komponenten vorhanden und auf dem neuesten Stand sind, müssen Sie möglicherweise Ihre Lightning App Builder-Einstellungen überprüfen, um sicherzustellen, dass die App für das Systemadministratorprofil sichtbar ist. Erfahren Sie mehr über benutzerdefinierte Software und wie Sie eine benutzerdefinierte App mit dem Salesforce Pack XML bereitstellen. Mit der richtigen Anleitung können Sie eine leistungsstarke, effiziente und sichere benutzerdefinierte App erstellen, die Ihre spezifischen Anforderungen erfüllt.

Was this helpful?

More Salesforce discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Salesforce Blogs

Guides, tips and career advice on Salesforce from JanBask experts.