Questions tagged [custom-metadata]

Custom metadata types are like list custom settings, but the records are deployable and packageable metadata.

Filter by
Sorted by
Tagged with
0
votes
1answer
365 views

Apex Metadata API Layout Read-only fields being added as Read-write

We have Layout Read-only fields to be added. Seems like a bug, when we try to add read-only fields they become read-write on layout. Please see below example. public class metadatatest { public ...
0
votes
1answer
1k views

No Package.XML found

Trying to deploy the Custom metadata loader ZIP file in workbench and its giving an error. Please see the below... Following this steps : https://github.com/forcedotcom/CustomMetadataLoader
0
votes
0answers
283 views

Named Credential : Pass username and password in url [duplicate]

I am new to using Named Credentials. I created a Named Credential with following details: Identity Type: Name Credential Authentication Protocol: Password Authentication and added username and ...
0
votes
0answers
134 views

Unable to create a look up field on Custom UI for Custom Metadata type

Has anyone ever tried to create a look up (relationship to other custom metadata type)field on the Custom UI for Custom Metadata type? The usual <apex:inputfield> doesn't seem to work.
0
votes
1answer
2k views

Custom metadata type code coverage in test class [duplicate]

I Have a map of custom metadata type Map<String,error_mdt> error error=[select id, DeveloperName from error_mdt].How can we Use meta data types in test class to get code coverage. I have ...
0
votes
1answer
1k views

Retrieve fields under a certain Custom object using Metadata API/Metadata Service class

I have a requirement where we have to retrieve all the fields under an Object say Standard or Custom. I am using FinancialForce Metadata service class. I can Retrieve all the Custom objects and all ...
5
votes
1answer
1k views

How can I get the API Name of a related EntityDefinition?

I'm trying to use Custom Metadata Types to specify some relationships between objects. So I started out by creating my Custom Metadata Type and adding a Metadata Relationship to an Entity Definition. ...
0
votes
1answer
2k views

How a Custom Metadata Type's field value can be referred in Lightning Component?

I have an URL that was saved in a Text(255) field of the Custom Metadata Type. I wanted to refer this Url on to the Lightning component, to make my custom onClick() to redirect to this Url. How can I ...
0
votes
2answers
366 views

How to perform Fuzzy search in a string field

Problem Statement: We created a custom metadata which has a field called programs. Since we cannot create multi-select field with custom metadata we have created a string field and stored all values ...
2
votes
1answer
961 views

Creating Custom Metadata from Test class

I am trying to create custom metadata from Apex test class. I have used this solved question as a reference and tried to create the same. But when I try to run the test method, I see the error as: ...
4
votes
1answer
1k views

Deploying Metadata through Metadata.Operations.enqueueDeployment fails with a null message

I am trying to play with the new Summer'17 feature of Deploying and Retrieving Metadata through Apex. I was trying to use the method Metadata.Operations.enqueueDeployment to update existing custom ...
1
vote
1answer
896 views

Migrate Custom metadata type

I need to migrate Custom Metadata type using a package.xml. Can someone please let me know what should I put to get the metadata along with data successfully get migrated? Suppose Custom Metadata ...
3
votes
1answer
1k views

How to get a field's API name when querying a field of datatype, Metadata Relationship(Field Definition)

In SOQL ,I do not understand the return value when selecting a field of type Metadata Relationship(Field Definition). In my custom metaData type "controllingObject__c" is of dataType ,Metadata ...
1
vote
1answer
826 views

Disjunctions not supported

I have learn that custom metadata have some limitation when it comes to SOQL and one of them is OR and what is the alternative to the below SOQL if the Salesforce does not support OR in this case ...
0
votes
1answer
242 views

How to migrate list custom setting to custom meta data types

If you are thinking of using list custom setting ,consider using custom metadata types instead. Here problems is how can i migrate the records of custom metadata types using packages or metadata API ...
3
votes
2answers
357 views

Converting Custom Objects to Custom Metadata

Before I understood the concept of Custom Metadata Types, we had a requirement in our application to store config data which rarely changes, and which is queryable. At that time, I chose to do this ...
1
vote
2answers
1k views

Global Value Set

I have created a GlobalValueSet using salesforce metadata api. Now I am creating a new field on a existing object using SF metadata api which is going to use this GlobalValueSet, but somehow its ...
1
vote
1answer
203 views

How to delete a custom metaData which I have added as a component in Managed package

How to delete a custom metaData which I have added as a component in Managed package? I dont see any delete button available and when I try to delete via workbench I get insufficient rights error.
13
votes
1answer
286 views

Massive Spring '17 bug: SOQL returns wrong Custom Metadata Type picklist value

Based on all evidence gathered there is a major bug in Spring '17 involving Custom Metadata Types and picklist values: what SOQL returns is different than what's saved in the database. To reenact: ...
9
votes
1answer
689 views

How to package ListViews for Custom Metadata Types?

Is there a way to package ListViews for Custom Metada Types? I can't see these ListViews when trying to add them to a package, but maybe there is a workaround?
5
votes
1answer
817 views

Custom Metadata Types versus Custom Objects for product/system types?

I have a use case where I plan to use Custom Metadata Types. I would create multiple custom metadata types, each one looking up to its master. First the base product, then product/family, where one ...
0
votes
1answer
412 views

How to cover code related to Custom Metadata logic?

I have a custom metadata called Custom_Metadata__mdt. I have one custom boolean field in that custom metadata called Custom_Boolean_Field__c. I need to execute some logic only if value of ...
0
votes
2answers
916 views

need help on Custom Metadata Type

I have one object Lead Support.In lead Support i have one Field QueueLabel__C. And I created one Custom Metadata with Name Queue_metadata and in that i have one field Queue_Label_c Requirement:when ...
3
votes
1answer
175 views

Cannot specify metadata relationship field when inserting custom metadata type records via API

I have two Custom Metadata Types. Content__c and Section__c. Each Section has a required Content__c record. I can insert Content__c records using a class generated from the metadata WSDL and ...
4
votes
1answer
99 views

Null pointer Exception in test classes when installing the Custom Metadata Loader

I am attempting to install the custom metadata loader into production. Per this issue on the github repo, I'm running into a null pointer exception. I am installing the new version, under the ...
2
votes
2answers
918 views

How to update custom Metadata Type Relationship Field using Metadata API

I want to update custom Metadata Relationship Field using Metadata API. I am using MetadataService.CustomMetadataValue to add the field and value parameters, but not successful in updating the ...
1
vote
1answer
164 views

Extracting Metadata for Contact Role on Account

Can someone please share the package.xml to extract the MetaData for "Account Contact Role" or is it Unsupported Metadata type. Thanks in advance!
8
votes
4answers
4k views

Custom MetaData Types reference in Formula Field

I have a custom metadata type and a field in it with a value. I am creating a formula field on an object(TestObject) where I would like to reference a value from the above custom metadata type into ...
2
votes
2answers
262 views

Cannot sort on numeric field with SOQL in Custom Metadata

Cannot sort on a soql-request in a custom meta data type. When i perform SELECT .. FROM x__mdt WHERE ... ORDER BY x. Then field x cannot be numeric to get a correct order. Change it to a string-field ...
6
votes
0answers
1k views

Relationship query on Custom Metadata Type giving wrong results

I have a parent Metadata Type having a child relationship. SOQL behaves differently in each of the following scenarios: SELECT ALLFIELDS, (SELECT ALLFIELDS FROM Children__r ORDER BY Order__c) FROM ...
2
votes
1answer
375 views

Has anybody been able to make a Custom Metadata Type record in the Salesforce UI?

I am trying to create Custom Metadata Type records in my Developer Org (Winter 17) but the edit record page is blank. Upon hitting save, I get validation errors about missing fields. My understanding ...
0
votes
1answer
118 views

Custom Metadata Types - Subscriber editable field - Value overwritten by ANT deploy

I'm writing today because I need to clarify something about the Custom Metadata Types. Here's my doubt: let's say we have a Custom Metadata Type named X__mdt, with a Subscriber Editable field Y__c of ...
1
vote
1answer
326 views

Variable does not exist: MetadataServiceExamples

I am executing this code and its giving me error. I am wondering where I am going wrong Variable does not exist: MetadataServiceExamples MetadataService.MetadataPort service = new MetadataService....
4
votes
3answers
388 views

Retrieve all records for a single CustomMetaDataType using ant

I'm trying to use the ant migration tool to retrieve all the Custom Metadata records for a single Custom Metadata Type. However, I can't figure out the syntax. I would think that something like this ...
2
votes
2answers
2k views

Custom Metadata types data limit

We are exploring the option of using custom metadata types over custom settings. What are the limitations on the size of data in Custom Metadata types? Is it inclusive of custom settings data limit?
2
votes
1answer
720 views

Trigger for custom metdata object

Is it possible to create trigger to custom meatada object ? Assume I have metadata object called MyMetaData , I want to create trigger to MyMetaData , for example before insert new instance of ...
2
votes
2answers
1k views

Can we use custom metadata type records in validation rule in salesforce?

I was trying to use custom metadata type in validation rule. My use case is i want a restriction on digits in phone number on various objects in managed package.I want to give flexibility to ...
2
votes
1answer
736 views

Edit Custom Metadata Records from a Managed Package

Custom metadata records seem to be great mechanism to store application configuration details, as unlike Custom objects or Custom settings, custom metadata records can be packaged with a managed ...
4
votes
1answer
104 views

If a custom metadata type is subscriber editable can the subscriber create a record?

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?
3
votes
1answer
1k views

How do you include fields values in MDT packages?

I have created a Custom Metadata Type, created some records ("Manage" button) and included it into a Change Set. When I deploy the CS, I only get the structure of the MDT not its values... I though it ...
5
votes
1answer
341 views

Deploying >10k Records within Custom Metadata Type Object

I have created a Custom Metadata Type object (lets say I have called it CMDObject__mdt). I have uploaded all of my configuration records into there but there are 12k records and so I cannot deploy ...
23
votes
5answers
8k views

Unit Test - Creating Custom Metadata

I have three questions that I'd like to be clarified. Is their anyway we could create Custom Metadata in Test Classes? I tried to create on my Test Class but I got an error saying the fields of the ...
1
vote
1answer
62 views

Custom metadatatype beta picklist fields in production

I'm trying to deploy some new custom metadatatypes from a sandbox to production, but the types contain picklist fields, which appear to be unavailable on my production org even though they are the ...
6
votes
1answer
5k views

Query For Custom Metadata Type WHERE Field = false Returning 0 Rows But Matching Record Exists

I'm querying my Custom Metadata Type VRecTypeNm__mdt using SELECT Label,ProductName__c,ProductCategory__c,EuOpps__c,NaOpps__c,PhysicalCard__c FROM VRecTypeNm__mdt WHERE Label = 'CP Virtual All In ...
3
votes
1answer
304 views

Is deploying of custom metadata records from sandbox going to overwrite existing metadata records in production

I wonder about this. Let's say: Step 1: I deploy custom metadata from Sandbox to Production. Step 2: Then somebody adds records to the deployed metadata in Production. This will create a difference ...
4
votes
1answer
91 views

Inline Edit on Custom Metadata

Is it possible to use inline edit feature with Custom Metadata? In most cases custom mdt acts like sObjects, however I cannot make it work and I can't find any related docs.
1
vote
1answer
579 views

Error - Must specify the name in the CustomMetadataType.CustomMetadata format - Custom Metadata Loader app

I've just deployed the Custom Metadata Loader app to my sandbox and am trying to load my first batch of records for my Custom Metadata Type Interchange_Table__mdt. When I select the CSV containing my ...
8
votes
1answer
11k views

Mass Insert Custom Metadata

Can Custom Metadata be mass inserted? My Custom Metadata Type is listed as a custom object in the Data Import Wizard but when I - select the object add new records choose the CSV file next none of ...
2
votes
1answer
95 views

Querying / Managing Queries with Multiple Permutations

I'm writing a class to implement Support.EmailTemplateSelector. To retrieve the correct email template, I'm querying a Custom Metadata Type Smart_Template_Loader_Conf__mdt, retrieving an ...
21
votes
5answers
24k views

Insert Custom Metadata for Unit Test

I have a controller that is querying custom metadata. I'm attempting to write unit tests to test the queries. Is it possible to insert test custom metadata for the purposes of unit tests?