Andy in the Cloud

From BBC Basic to Force.com and beyond…

14 thoughts on “Be One with the Platform through Custom Metadata

  1. Pingback: Custom Metadata, Custom UI’s, Packaging and Change Sets | Andy in the Cloud

  2. Pingback: Declarative Lookup Rollup Summary Tool and Custom Metadata | Andy in the Cloud

  3. Hi,
    I am trying to create records in a Custom MetaDataType using https://github.com/financialforcedev/apex-mdapi. But when I create a list to use a method CustomMetadataService.createMetadata I get an error Compile Error: Field is not writeable: NAMESPACE__TestRetention__mdt.DeveloperName at line 53

    Here is my code
    List newList = new List();
    for(NAMESPACE__TestRetention__mdt s: newList)
    {
    s.developername=’New’;
    s.label=’New’;
    s.masterlabel=’New’;
    s.qualifiedapiname=’New’;
    newList.add(s);
    }
    CustomMetadataService.createMetadata(newlist);

    How do I create data for inserting it into the method if I cant insert it to a list? Can you help?

  4. Pingback: How to leverage custom metadata types - FinancialForce blog

  5. Hi Andy,

    This code is awesome! Thanks for the write-up.

    I tried moving your MetadataService and CustomMetadataService files into my sandbox but hit the 3M character limit (those two files themselves are over 1M characters). Will I still hit this limit if I deploy directly from GitHub to sandbox?

    Thanks for your help,
    Jeremy

    • Thank you! Sadly yes same process under the hood. It’s possible to breakdown the metadataservice but tedious, maybe better to selectively copy as you need bits

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s