2

I have designed a feature that uses a Custom Metadata Type to facilitate page layout updates when the package is updated. To test this process I am having to create "test" Custom Metadata records that will need to be packaged.

How much space do these test records take up? I don't want to take up customers storage space with these test records but it seems to be the only way in which I can test and reach acceptable code coverage.

2 Answers 2

3

If your application is certified (a managed package that's been through the security review), the 10MB limit applies to your own namespace. Your clients still get 10MB for themselves and other, non-certified packages. See Custom Metadata Allocation for more details.

Custom metadata records in certified managed packages that you’ve installed don’t count toward your organization’s allotment. However, custom metadata records that you create do count toward it. This rule applies regardless of whether you create records in your own custom metadata type or in a type from a certified managed package.

In other words, assuming you're planning on going through a security review, your custom metadata will take zero bytes of storage. If not, then it will be the amount listed on the custom metadata type and explained in the documentation above.

Note: this particular note is written from the subscriber's perspective. All you need to know is that records you pre-package in your package won't count against your subscribers, but if they create additional records, those records will count.

0
1

Record size is based on the maximum field size of each field type, not the actual storage that’s used in each field. When adding fields to a custom metadata record, use the appropriate type and specify a length that doesn’t exceed what’s needed for your data. This action helps you avoid reaching the cached data maximum. For example, if you create a US social security number (SSN) field, select the Text data type and specify a length of 9. If instead you selected Text Area, the field would add 255 characters to the usage count for each record, regardless of the number of characters entered.

Usage Calculation

  • Usage is calculated in characters. You can store up to 10 million characters.
  • Standard fields like Label, Name, and Namespace, are included in your usage calculation but Description and Qualified API Name are not.
  • Long text area fields (up to 255 characters per long text area field for a given type) are included in the usage calculation. Metadata relationship fields count as 15 characters in the usage calculation if their target is another custom metadata type, or 10 characters if the target is Entity Definition or Field Definition. Picklists and checkboxes both count as 10 characters.

It's all documented here.

0

You must log in to answer this question.

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