10

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

14

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

6
  • 1
    holy sh*t, I never thought this could be the answer.
    – Ruwantha
    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
    Jan 26, 2022 at 22:57
  • @Dan - thanks for letting me know, I updated the OP to reflect this
    – cropredy
    Jan 26, 2022 at 23:00
  • @cropredy do you have a link to the known issue? Feb 17, 2022 at 0:02
  • 1
    As of v57, this workaround is still working.
    – Bryan
    Mar 22 at 17:24

You must log in to answer this question.

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