3

Is there any way to overcome the apex limit for total number of SOQL queries issued using custom metadata records?

7

I guess it really depends on if the data you are querying is data, or metadata?

I think you're possibly referring to using Custom Metadata Types as data rather than metadata?

Whilst it's true that the limits are relaxed for SOQL queries for querying Custom Metadata, using Custom Metadata for data would be both challenging, and a waste of resources. For example, it is not currently possible to insert/update records using DML. Neither is there a UI. This means you'd have to develop your own method of inserting/manipulating data using the Metadata API, not to mention providing a UI.

There are also other features and limitations that I think would prevent you from realistically using Custom Metadata for data. However, if your data is actually metadata, then this is the raison-d'être of Custom Metadata and is ideally suited.

EDIT: as of Winter '16 you can now edit custom metadata type records declaratively.

| improve this answer | |
  • 1
    There's also something major to note about custom metadata, even in Winter 16 (and we have no immediate plans to change this), that makes using it for regular data storage iffy at best: Whether through the metadata API or the declarative edit functionality, creating/inserting/editing custom metadata records requires the Customize Application permission--in other words, most non-admin-or-dev users can't do it. – Avrom Roy-Faderman Oct 23 '15 at 16:58
  • The final nail in the coffin :). Only managed to use mdt in one project thus far (prior to the UI too!), to describe an input file - seemed perfectly suited. – Phil Hawthorn Oct 23 '15 at 17:16
  • 2
    Yeah, stuff like file specifications is a great use case. – Avrom Roy-Faderman Oct 26 '15 at 18:17

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.