11

I have a non-managed package Custom Metadata object in my developer sandbox org

Foo__mdt
  • I am the system admin

  • When I try to delete this object from Setup, it fails with Insufficient Privileges

  • If I delete the object from within my IDE (Illuminated Cloud), the MDT is deleted just fine (it disappears from Setup)

  • If I create a brand new MDT in my dev org; I can't delete it from Setup

In other orgs, I can delete the same MDT without issue

The only clue I have is that the orgs where I can delete the MDT were not recently refreshed from PROD (recent as in the last 30 days).

UPDATE - Same error for CustomObject UPDATE - per @Dan, also happens for renaming API name of CustomObject


Why would deletion from UX yield Insufficient Privileges yet deletion from the IDE using the same user credentials work?

1 Answer 1

17

This is an issue under investigation by SFDC R&D that apparently affects some customers and is not limited to just Custom Metadata deletion (affects also Custom Object deletion including hard deletion)

Per SFDC Support, a Known Issue has not yet been created

There is a workaround though:

Steps:

  1. Try and delete (or API rename) MDT or Custom Object from Setup
  2. FAIL - Get Insufficient Privileges Error
  3. Setup | Translation Language Settings | Enable (YES, you read this right)
  4. You get a page of languages, choose your language and make it Active, assign to yourself. Save.
  5. Try and delete (or API rename) MDT or Custom Object from Setup
  6. SUCCEEDS!
  7. Disable Translation Workbench

UPDATE Spring 22 (V54) - this workaround may no longer work.

UPDATE March 2023 - a related Known Issue

UPDATE March 2024 (V60) - the workaround still works

7
  • 1
    holy sh*t, I never thought this could be the answer.
    – Ruwantha
    Commented Dec 22, 2021 at 15:28
  • Thanks for the answer. These steps also worked to rename a custom objects api name which was giving an Insufficient Privileges error.
    – Dan
    Commented Jan 26, 2022 at 22:57
  • @Dan - thanks for letting me know, I updated the OP to reflect this
    – cropredy
    Commented Jan 26, 2022 at 23:00
  • 1
    As of v57, this workaround is still working.
    – Bryan
    Commented Mar 22, 2023 at 17:24
  • 1
    On 19 March 2024 @jameskeaney posted as an answer that the workaround works for him. I, too, can verify that the problem exists and the workaround works in Spring '24. If you read this comment and you have the issue, please go to the Known Issue linked in this answer and click the "Report" button to report that the issue affects you/your org(s).
    – Moonpie
    Commented Mar 20 at 12:20

You must log in to answer this question.

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