Intro To Salesforce Package


What is a package
A package is basically a container—it can hold something tiny like a single component or something massive like a whole set of related apps. The cool part? You can create a package and distribute it to other Salesforce users and organizations, and they don't even need to be connected to your current org!
You can literally deploy anything from one org to another org even if they're completely disconnected. Packages handle all that magic for you.
It's like having a delivery service that doesn't care if the sender and receiver have ever met before!
There are 2 types of packages in Salesforce.
Unmanaged packages
Unmanaged packages are like giving away your source code. They're typically used for distributing open-source projects or application templates, basically handing developers the building blocks to start their own thing.
once someone installs components from your unmanaged package, they can edit them however they want in their org. It's like giving someone your recipe and saying "go wild with it!"
Once you upload that unmanaged package, you lose ALL control over it. You can't update it, you can't upgrade it, you can't even see what people are doing with it. It's gone!
So basically, the moment you distribute an unmanaged package to another org, you're waving goodbye to any control over those components. They belong to the new org now—for better or worse!
Managed packages
Managed packages are the complete opposite! Now we're talking about CONTROL.
With managed packages, the developer who created it keeps all the power—they can upgrade the package whenever they want.
They can lock down the components so developers in other orgs can't mess with them!
So if you want to maintain control over your components and push updates to everyone who installed your package, managed packages are the way to go.
To CREATE an unmanaged package, here's what you do.
Login to Salesforce, then in the quick find box, search for "package". You should see some options pop up like in the image below. Click on "Package Manager".
Click on the "New" button, and just fill out the package info like you see in the screenshot below, then hit save. Since we're creating an unmanaged package, make sure you DON'T check the managed checkbox.
You'll get redirected to a package detail page, and here's where things get interesting! Under the "Components" tab, you'll see an "Add" button. This is where you actually select what components your package should contain.
In the component dropdown, let's select Custom Object
as our component type. Then under our custom objects, select any object of your choice and click Add to package
.
In packages, you can literally throw in anything you want—triggers, LWC (Lightning Web Components), Apex classes, objects, you name it! You can keep using that "Add" button to pile more components into your package.
After you've added all the components you want, you need to upload the package. That's when it actually becomes something you can distribute to other orgs.
Clicking on the "Upload" button brings us to this page.
On this page, you'll need to enter your version name
and version number
or just leave the version number
as it is. Add your release notes URL if you've got them, or just leave it as "none" if you don't have one.
If you scroll down, you'll also see the password fields.
If you want users to have a password before they can install this package in their org, then you can fill this out. Otherwise, just leave it blank.
For the package and object requirements section, we're just going to leave everything as it is and hit that upload button. No need to overthink this part!
The package upload is now complete! Let's copy that installation link and paste it somewhere safe. Now you can share this link with anyone you want, and they can install your package in their org.
From The Package Installer Point Of View
Currently, the user who wants to install this has no installed packages yet.
So we're starting from a clean slate here—perfect for seeing how the installation process works from scratch!
We're assuming we've already shared the link with the user. Before installing, you'll want to double-check that you don't have any components that might conflict with what's in this package.
If there is a conflict this installation will fail , make sure you select the “Do not install” option, Also select
“Install for All Users” before clicking the install button.
Once we've established that everything looks good, click the Install
button to install the package in your org.
Package Installation is complete 🎊🎊
That was actually way smoother than I expected the first time I did this.
Additional Links
Subscribe to my newsletter
Read articles from Momoh Tyler directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Momoh Tyler
Momoh Tyler
I'm a Back-developer at Tiidelab. Focusing More On Growth 🥂And mostly an Associate of the God kind 🍷