How to Uninstall Swantide's Package in a Salesforce Environment
Uninstalling a package in Salesforce can be a complex process, especially when the package is deeply integrated into your system. This guide will help you through the steps necessary to remove the Swantide package from your Salesforce environment while following general best practices for uninstalling any Salesforce package.
General Best Practices for Uninstalling a Salesforce Package
1. Backup Your Data [Optional]:
Always back up your Salesforce data before uninstalling any package. This includes exporting reports, dashboards, and any custom fields.
Use tools like Data Loader or Salesforce's data export feature to create backups.
You can export your whole org's data by going to Setup > and searching Data Export in the Quick Find box.
Using Salesforce Data Export:
When an export is ready for download you will receive an email containing a link that allows you to download the file(s). The export files are also available on this page for 48 hours, after which time they are deleted.
2. Test in a Sandbox (Optional)
Perform the uninstallation in a sandbox environment first. This helps identify potential issues without affecting your production environment.
Validate that your business processes continue to work as expected after the package is removed.
Swantide Package Uninstallation Steps.
Before you can Uninstall the Package, you will need to remove any dependencies from the Package that are present in your Salesforce environment.
You can check this out by going to Setup > typing Packages in the Quick Find Box.
When you click "Uninstall", Salesforce will prompt you with a warning.
Go to the bottom of the page and check the following and click "Uninstall"
When you click Uninstall, if you have dependencies from the Package still present, Salesforce will present you with the following message.
What this means is that you will need to first rectify the dependencies stemming from the package. Below is a general guide on what dependencies you can expect to clean up first before you can uninstall the package.
Package Dependencies:
1. Remove Users from the Standard_User Permission Set Group:
Navigate to Setup.
Go to Permission Set Groups.
Select the relevant Permission Set Group.
Under Managed Assignments, highlight the users and remove them from the group.
2. Remove Users from Permission Sets:
Only needed if you assigned user(s) to a specific Permission Set from the package and not at the Permission Set Group level
Following the steps of Step 1:
Navigate to Setup.
Go to Permission Set.
Select the relevant Permission Sets (see Applicable Permission Sets from Base Package)
Under Managed Assignments, highlight the users and remove them from the Permission Set assignment.
Applicable Permission Sets from Base Package
Swantide_Record_Perms
Swantide_report_and_dashboard_creation
Merge_Duplicates
Multifactor_Authentication
BillingPermission
Change_standard_object_ownership
3. Reassign Page Layouts and Lightning Pages:
Page Layouts and Lightning Pages assigned to profiles will need to be reassigned.
Reassigning Page Layouts:
Go to each Object referenced in the package (Account, Contacts, Leads, Opportunities, Opportunity Products, Price Book Entry, and Product).
Navigate to Page Layout.
Click on Page Layout Assignment.
Assign a new Page Layout to all profiles, ensuring not to use any Page Layout with "Swantide" in the title.
Repeat these steps for each Object referenced in the package (Step 3.1)
4. Reassigning Lightning Pages:
Go to Setup and search for Lightning App Builder.
Select a Lightning Page that has "Swantide" in the title.
Click on Activation.
Check with "Remove from Org Default" appears (see screenshot below)
If "Remove from Org Default" appears click on the button.
Select "Desktop and Phone" as the Form Factor Assignment
Follow the wizard to revert the Lighting Page to the System Default or another Lighting Page of your choosing that is not from the package.
5. Move Reports and Dashboards to Non Swantide Folders:
If you want to retain the reports and Dashboards from the package, you can do so by moving all reports and dashboards out of folders named Swantide Reports and Swantide Dashboard, otherwise, you can delete the Report and Dashboards and their folders.
If any custom fields from the package are used in reports and dashboards, remove those fields or delete the reports and dashboards to remove dependencies.
6. Deactivate and Delete Flows:
Navigate to Setup.
Go to Flows by typing Flow in the Quick Find Box
Select the relevant Permission Set Group.
Navigate to any active flows created by Swantide.
Deactivate the Flow if its Active
In the Flow Details page, Click Delete to delete the deactivated flow.
If you copy any flows, ensure to remove any custom fields from the package in the flow to avoid dependencies.
7. Handle Custom Fields:
Identify and back up any custom fields that will be removed.
Create new custom fields to replace the ones being removed.
Map the backed-up data to the new custom fields.
8. Uninstall the Package:
Once all dependencies have been removed:
Navigate to Setup.
Go to Installed Packages.
Find the Swantide package and click Uninstall.
Follow the prompts to complete the uninstallation.
Important Considerations:
Custom Fields: Ensure you back up data from any custom fields and remap it to new fields to preserve historical data.
Reports and Dashboards: Deleting reports and dashboards will permanently remove them, so make sure to back up necessary data.
Flows: Custom fields used in flows must be removed or replaced to avoid uninstallation errors.
Permission Sets: Removing permission sets may impact users' access, so reassess user permissions post-uninstallation.