TransWikia.com

Is it ok to delete a managed package?

Salesforce Asked by Jayesh Babu on October 4, 2021

I have developed an app in salesforce and created a managed package for the app, so that I can generate a installation url and send it to my client. But, the problem i have now is that, when I edit global methods in the controller and REST classes, I am getting this error:

Global/WebService identifiers cannot be removed from managed application

So, my question is, will I be able edit the classes if I delete the managed package? As the app has not been published, I don’t have any problem deleting the package. I just want to know will this work, so that I can delete the package, edit the classes and create a new managed package.

EDIT: The managed package I created is a 1GP package.

One Answer

There are some options for this situation though what you do depends on whether you want to use the same namespace.

With a first generation managed package only a single package can use a given namespace so you won't be able to re-use that namespace with a new first generation package. However, you can create a second generation package in the same namespace and with the same code in it without any significant issues.

If you don't care about the namespace then just quietly forget about the 1GP, create a new namespace and use the code, adapted to the new namespace as needed, with a 2GP (or another 1GP, though I would recommend against that).

If you want to keep the namespace, the important points to note:

  • You'll need to register the namespace for your 1GP with your Dev Hub in order to allow you to create a 2GP using the same namespace.
  • You cannot install a 1GP and a 2GP that share the same namespace on a given org so you might need to abandon any orgs you had the 1GP on (if you face issues even after uninstalling the 1GP).
  • There are limitations as to what you can and cannot include in a 2GP. Check the latest Metadata Coverage Report for details.

Correct answer by Phil W on October 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP