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
    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 May 27 '16 at 4:00
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'];

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.