7

My company is in the final stages of a project where we developed (using DX but 1st generation packaging) a managed package for the customer. This week is the first time we're actually packaging it up for installation.

I created a packaging org with a throwaway namespace - e.g. our initials, our customer's initials, and "1". I did this in order to "be able to make the first-timer mistakes" without risk, and I think I just made my first.

We have a handful of protected Custom Metadata records that exist in order to give unit test coverage but remain hidden from the end-user. After creating our first "released" version (not actually a version we are releasing), I wanted to see what it would allow us to remove from future versions of the app. So I picked one of the Custom Metadata records. But I accidentally deleted it from the org entirely rather than removing it from the package.

The net result was that it continued to appear as a component in the package but with a blank name linking to nowhere. I could not find any way to undelete the record. And I could not recreate a record with the same API name because that's how packaging orgs work. It allowed me to remove the blank component but it never appeared in the Deleted tab after.

Is there anything I could have done after that deletion to restore the CM record for the next package release? Or have I just run into one of those "permanent pitfalls every vendor needs to know"? Time to create throwaway namespace #2?

1 Answer 1

0

Assuming you have not yet uploaded a new version, you can follow the steps in Viewing Deleted Components:

To access the Deleted Package Components page, from Setup, enter Packages in the Quick Find box, then select Packages. Select the package that the component was uploaded to, and then click View Deleted Components. If a component can be retrieved through the Recycle Bin, it can also be retrieved through this page.


You can retrieve components from the Recycle Bin and Deleted Package Components page any time before uploading a new version of the package. To do this, click Undelete next to the component.


If you've already uploaded a new version, then you're probably out of luck. In addition, that type may not be supported for undeletion (it's not in the list, but I can't confirm this). If you've already uploaded a new version, you still might be able to fix it, but it will require support from Partner Support to right it, so it may also be worth it to submit a case through the Partner Portal to see if they can fix it.

3
  • I have already uploaded a new beta but not another released version. However I can confirm that, before uploading the new beta, the CM record never appeared in either Recycle Bin or Deleted Package Components.
    – Charles T
    Commented Apr 20, 2018 at 14:59
  • @CharlesT Try submitting case via the partner portal. They may be able to do something for you. If not, you're out of luck.
    – sfdcfox
    Commented Apr 20, 2018 at 16:18
  • Not a big deal in this case - the API name was not critical so I created a new CM record in the same role with a different name. Just curious if there was any way to reverse it in a non-fake situation.
    – Charles T
    Commented Apr 20, 2018 at 18:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .