How to Create and Deploy Unmanaged Package in Salesforce : Bijay Kumar

How to Create and Deploy Unmanaged Package in Salesforce
by: Bijay Kumar
blow post content copied from  SalesForce FAQs
click here to view original post



### Summary of Unmanaged Packages in Salesforce When you develop an application in Salesforce and want to move it to another Salesforce organization (org), you need to create an unmanaged package. This package allows you to bundle your application components, like custom apps, objects, and flows, and share them via a generated link for installation in a different org. **What is an Unmanaged Package?** Unmanaged packages are simple containers used to share open-source or internal projects. They allow users to customize the components after installation. Key points include: - All components are editable after installation. - They cannot be upgraded; any updates require a new package installation. - Components appear as if they were created natively in the target org. **Creating and Deploying an Unmanaged Package:** 1. **Setup**: Go to Setup and find Package Manager. 2. **Create Package**: Click "New," name your package, and select "Unmanaged." 3. **Add Components**: Include the necessary components like apps and flows. 4. **Upload Package**: Provide version details and upload the package. 5. **Share Installation Link**: After uploading, share the installation URL with the target org. **Installing an Unmanaged Package:** 1. **Access Installation Link**: Paste the link in your browser and log in. 2. **Select Components**: Choose which components to install. 3. **Install**: Click "Install" and confirm the installation. 4. **Verify Installation**: Check the installed packages in your org to ensure everything is set up correctly. ### Conclusion Unmanaged packages are a straightforward way to share and deploy Salesforce applications, allowing for customization by the receiving org. This tutorial provides a step-by-step guide to creating and deploying these packages effectively. ### Additional Context Unmanaged packages are particularly useful for developers who want to share their work with others without restricting modifications. They are ideal for open-source projects and internal tools where flexibility is needed. ### Hashtags for SEO #Salesforce #UnmanagedPackages #SalesforceDevelopment #SalesforceTutorial #SalesforceApps #CloudComputing #CRM #SalesforceFlow #DeploySalesforce #SalesforceIntegration


After creating any application in Salesforce, when you want to deploy that application from one Salesforce org to another, then first we need to create and upload the package of that application, and then the generated link we can share to different org where we want to deploy the package.

In this Salesforce tutorial, we will learn about unmanaged packages in Salesforce. In that, I will explain an unmanaged package and how to create and deploy unmanaged package in Salesforce.

What is An Unmanaged Package in Salesforce?

Unmanaged packages in Salesforce are simpler containers that are often used to bind and distribute open-source or internal projects such as custom apps, custom objects, fields, Apex classes, Visualforce pages, and more. They are often used to share a solution or application that the receiver Salesforce org user can customize.

Below are some properties of unmanaged packages in Salesforce.

  • All components that we upload in an unmanaged package are editable after installation to another org. It allows organizations to customize them as per their requirements.
  • Once installed, unmanaged packages in the other org cannot be upgraded. If new changes are needed, the updated package must be installed separately, and the user needs to make changes or adjustments that may be required.
  • Components from unmanaged packages do not have a namespace prefix, which makes them appear as if they were natively created in the target org.

Create and Deploy Unmanaged Package in Salesforce

In the below steps, I have explained how to create and deploy an unmanaged package in Salesforce. So that we can create a package, upload it, and install it on a different Salesforce org.

Let’s take an example: when we developed any Salesforce flow that automates the process of sending an email to managers and others who are CC recipients when a user or employee requests for leave.

You might be thinking we can add hardcoded CC recipient email addresses to email action in the flow. Then the problem with that is that after deploying the flow to the other Salesforce org if the end user wants to change CC email addresses, it is very difficult if they don’t have knowledge about flows.

For that, I have developed a flow to  Dynamically Add the CC Recipient’s Address List to the Salesforce Flow. In this article, I have explained how dynamic CC addresses are beneficial to the end user.

Create and Upload Unmanaged Package in Salesforce

In the steps below, we will show you how to create and upload flow to Salesforce for unmanaged packages.

1. Click on the Setup. -> Home Page. -> In Quick Find Box, Search for Package. You will see Package Manager. -> Click on It.

Here, I have created different packages. To create a new package, you can New button click on it.

Create and Deploy Unmanaged Package in Salesforce

2. In the Package Name, provide the name of your package. Select your preferred language. In Salesforce, we have Managed and Unmanaged Packages. Here, we are creating an unmanaged package, so we need to check the Manage option.

The Description is optional; you can provide a short introduction about your package.

Then click the Save button to create a package.

Create Unmanaged Package in Salesforce

3. You can see the unmanaged package has been successfully created. Now, we need two components, which we want to deploy to different Salesforce orgs. In Salesforce packages, components are Custom Apps, Objects, Flows, Apex Classes, Triggers, VF Pages, etc. To include components in this package, click on the Add button.

Managed and Unmanaged Packages in Salesforce

4. In Component Type, we can select different components from Salesforce org. Here, I selected App, and then you will see all the custom apps that you created. When we add any app to the package, all associated tabs, fields, list viewsrecord types, etc, get added to the package with the app component.

We selected the Leave Approval custom app because, in the flow, we used some custom objects associated with this object. For that, we also need to install those objects on the other org.

Add Components to Unmanaged Package in Salesforce

Now, to add the flow in the component type, we need to select Flow Definition. After that, you will see all the flows that you created. Then, click the flow you want to add to the package and click the Add to Package button.

Add Flows to Unmanaged Package in Salesforce

5. As you click the add to package button, you will see all the components that came with the selected app and the flows. If you want to add more components, then you need to click the Add button, and if you want to check component dependencies, then click the View Dependencies button.

Suppose you added all the components that you want to send to other Salesforce orgs. Then click the Upload button.

Upload Components to Unmanaged Package in Salesforce

6. Provide the Version Name and the Version Number for your unmanaged package. Here, you can provide anything. This is used to identify the package in different org.

In unmanaged packages, there is no need to add a URL. In the Release Note, you can provide a URL so that when other org users click on it, they will see the release note of a particular package.

Same for the Pre-Install Instructions. Also, if you select the URL option there, you can provide instructions on how to install the package.

Unmanaged Package Details in Salesforce

7. The password is optional. If you don’t provide a password for this package, anyone can install it if they have a Salesforce account. If you provided any password to this package, then to install it to a different Salesforce org, they need to enter a password that you provided to verify the user.

After that, you don’t need to do anything directly. Click the Upload button.

Provide Password to Unmanaged Package in Salesforce

9. As you click on Upload, you can see the components are uploading, and we also have the Version Details we provided. The Password Protected checkbox is unchecked because we didn’t provide a password to this package.

How to Upload Unmanaged Package in Salesforce

10. After uploading is completed, you will see the Upload Complete alert. To deploy this unmanaged package to the other Salesforce orgs, we need to copy the Installation URL and send the URL through Salesforce chatter, social media, or messaging apps,

Unmanaged Packages in Salesforce

In this way, we can create and upload flow or other Salesforce components to unmanaged packages.

Deploy or Install Unmanaged Package to Different Org in Salesforce

In the below steps, I have explained how to deploy or install an unmanaged package to our Salesforce org to get components from other Salesforce org.

1. Before starting the package installation process, let me show you I don’t have any custom app named Leave Approval. The package we are going to install contains the Leave Approval app, some objects, and flow.

Deploy Package in Salesforce Org

2. You need to copy the link that you get from other Salesforce org users. Then paste that link to the browser where you have logged in with your Salesforce credentials.

Unmanaged Package URL in Salesforce

3. After entering the link, you will be redirected to the Salesforce developer org login page, and again, you need to log in to your Salesforce org.

As you click the Log In button, you will see the below UI.

First, you need to select the component you are going to install from this unmanaged package. If they are already available in your org, then either you can restrict them from being installed or rename them in the package before installing them.

Then, you need to select the usability of the component, which means you need to select who can use this component in your org.

  • Install for Admins Only: This package’s component can only use admin from your system.
  • Install for All Users.
  • Install for Specific Profiles: When you select this option, you need to select profiles so that only those profile users can access components.

Now, you are ready to install this unmanaged package in your Salesforce org. For that, click the Install button. You can also check which components have been sent by the other org user by clicking on the View Component option.

Install Unmanaged Package in Salesforce

4.  When the installation gets started, you will see the below UI.

Deploy Unmanaged Package in Salesforce Org

5. When the package successfully gets installed, you will see the Installation Completed message. Then click the Done button.

Salesforce Unmanaged Package Installation

6. After installation, to see the installed packages in your Salesforce org, in the Quick Find Box, search for those Packages, then click the Installed Packages.

Here, you can see the Email Flow Package Name that we provided while creating the package in a different org, and it has been successfully installed.

Installed Packages in Salesforce

7. Now, let’s check whether the components that we get in the unmanaged package get installed or not.

Here, I’m again searching for the Leave Approval, and you can see the app has been successfully installed in our Salesforce org.

Unmanaged Packages Installed Components in Salesforce

8. Now go to the flow, and you will see the Flow that we added in the package while creating one. It also has been deployed with Package State as Unmanaged.

Unmanaged Packages Deployed Components in Salesforce

In this way, we can install or deploy components such as custom apps, objects, Apex classes, triggers, etc., from other Salesforce org to our org using unmanaged packages in Salesforce.

Conclusion

I hope you have got an idea about unmanaged packages in Salesforce. In that, I have explained an unmanaged package and how to create and deploy an unmanaged package in Salesforce.

You may like to read:

The post How to Create and Deploy Unmanaged Package in Salesforce appeared first on SalesForce FAQs.


December 27, 2024 at 07:08PM
Click here for more details...

=============================
The original post is available in SalesForce FAQs by Bijay Kumar
this post has been published as it is through automation. Automation script brings all the top bloggers post under a single umbrella.
The purpose of this blog, Follow the top Salesforce bloggers and collect all blogs in a single place through automation.
============================

Salesforce