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
1
vote
1answer
304 views

Custom metadata types - Deletion & access

I have 2 questions on Custom Metadata type records: Is it possible to delete custom metadata records in a subscriber org? I can delete it in the packaging org but how can I send this deletion signal ...
0
votes
1answer
105 views

Custom metadata type records - Getting deleted in the subscriber org

I have created a custom metadata type with 'Public' visibility at the metadata level but restricting the access to 'Upgradable' on the record level. I managed package it and installed it in the ...
1
vote
1answer
225 views

Limiting access with Custom Metadata types

We are implementing a high-security project which will be manage packaged.We are planning to use custom metadata types to store master data in 2 tables. These 2 tables are like a master->detail.I had ...
4
votes
1answer
203 views

Can FeatureManagement.changeProtection() be used to Protect any Custom Object?

Winter 18 introduced the FeatureManagement Apex Class, which contained a method which I was not expecting: changeProtection. According to the docs, changeProtection can be used to "Unprotect" objects ...
1
vote
1answer
2k views

Anyway to mass delete Custom Metadata Type records?

I currently have 100+ records I need to delete under my custom metadata type, and I am not keen on having to do it one by one (I will need to reset the records every now and then as our requirements ...
0
votes
1answer
862 views

Error with Custom Metadata deployment via metadata API

In testing dev org (org A) CustomMetadata was made and added to the package. This package was retrieved via metadata API (VS Code + ForceCode plugin). Now I am trying to deploy (migrate) all changes ...
1
vote
1answer
42 views

Can we skip the custom metadata object name field during setup?

I've a sync status that I need to map across platforms for which I'm planning to use the custom metadata type because of the following reasons. I've a list of key-value pair records that needs to be ...
9
votes
1answer
572 views

How do I update a namespaced Custom Metadata Type record after making a package?

Here's the situation: We have a Lightning App that reads from a Custom Metadata Type to populate a settings/configuration page. Then you can edit the page and click save and that will create a ...
6
votes
1answer
634 views

Can I Create Child Custom Metadata records through the Metadata API?

I have a requirement where I need to create parent and child custom metadata in an org programmatically. Since DML operations are not supported for creating custom metadata records, I am calling the ...
0
votes
1answer
40 views

Can we use Custom Metadata Types in Group Edition?

We have a managed package currently using custom settings, and it has been installed in all editions except Database.com, i.e. Group, Professional, Performance, Unlimited and of course Developer. We ...
6
votes
1answer
293 views

Custom Metadata Relationships and Compound Fields

Custom Metadata Types now support relationships, so we can have a reference to an object and even references to field definitions. Is there a way to reference the individual parts of compound fields, ...
9
votes
1answer
1k views

Why are where clause comparison operators case-sensitive when using SOQL to query custom metadata?

When using SOQL to query custom metadata records, the comparison in my where clause appears to be case-sensitive. Example: MyField__c is a text field that is NOT unique and NOT case sensitive ...
0
votes
2answers
158 views

Using Global variables inside of Custom Metadata with Visualforce page Modal

What are design options for the following requirements? End user specifies the text of a Modal window to be something like: Hello [User Full Name], Because you chose [Case.FieldA] goto this <a ...
0
votes
1answer
399 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
324 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
144 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
3k 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 ...
6
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
3k 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
481 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
1k 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: ...
5
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
1k 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
2k 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
1k 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
300 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
427 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
211 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
294 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
719 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
870 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
569 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
1k 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
185 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
105 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
1k 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
197 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
5k 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 ...
3
votes
2answers
338 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 ...
7
votes
1answer
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
438 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
125 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
384 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
429 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 ...
3
votes
2answers
3k 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
801 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 ...