4

Is it possible to deploy a custom metadata type in a managed package with on record that users can edit without the permissions to create any more?

1
  • 1
    Documentation only speaks about editing records. No mention of Adding new rows. Yet in a few spots it says to add a record you need customize application permission but it is unclear if that only related to the dev org. Good question.
    – Eric
    Commented May 27, 2016 at 4:00

1 Answer 1

2

It's not currently possible to do this, although it's on our radar.

The workaround is to filter your queries by NamespacePrefix, so that custom metadata records created outside your namespace don't have an effect on your app.

E.g., instead of

MyType__mdt myRecord = [select DeveloperName, CustomField__c from MyType__mdt];

use

MyType__mdt myRecord = [select DeveloperName, CustomField__c from MyType__mdt where NamespacePrefix='my_namespace'];

You must log in to answer this question.

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