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
2answers
437 views

Custom Metadata records Sandbox refresh

If I create Custom Metadata records in prod, and then I refresh my sandbox, will the Custom Metadata records I created in prod now be in my refreshed sandbox? I'm considering migrating to a custom ...
0
votes
1answer
158 views

Permission Set to Restrict Access to Managed Package Specific Custom Metadata

We have a managed packaged that ships with a Custom Metadata property and an "Editor" that allows users to modify the Custom Metadata fields and create new ones. We would like to include a permission ...
0
votes
1answer
37 views

Compare field to large list within Salesforce

I have a large list of email domains that I would like to use for comparisons within some apex code (for example, does the Contact's email domain name exist in this list). What is the best practice ...
2
votes
1answer
28 views

Use order by clause in cross -object metadata relationship

Is there a workaround to handle order-by in cross-Object metadata relationships? So Here is the querry. SELECT Id FROM Child__mdt ORDER BY Parent__r.Order__c ASC where Parent and Child are the ...
0
votes
0answers
315 views

Update Custom Metadata

I am trying to update some custom meta records. There are current 4384 records in the system. And update give me an error of "Collection size 4,384 exceeds maximum size of 1,000." This happens even if ...
5
votes
0answers
178 views

Unable to query with cross-Object pick-list field filter on Custom Metadata SOQL

I came across something weird, SOQL which has a filter as cross-Object picklist field doesn't return rows, even if records exist. Minimum viable code to replicate: Create a new custom metadata type, ...
3
votes
1answer
222 views

Beta Package (Not allowed to install metadata via apex)

I have a beta-managed-package the when deployed has a Apex Metadata API call out that allows users to modify some Custom Metadata that is shipped via the the code. It also allows them to create new ...
1
vote
1answer
1k views

Export all Custom Metadata Types details in csv

Recently took over the instance as admin. Previous instance is managed by an outsourced development team. There are 3 picklists that are controlled by custom metadata types and apex trigger. Not ...
2
votes
1answer
139 views

Testing Metadata Using Mock Call Outs to Static Resources

I have a class that is called before the handler method of a trigger to check and see if a Custom Metadata Field is checked and therefore the code in the trigger handler should not be run. I can ...
7
votes
1answer
213 views

Design Dilemma - Custom metadata Types

I was trying to solve a problem with access and refresh tokens across multiple businesses in a single org and thought I would use Custom metadata Types. The main reason was the field length can be > ...
1
vote
1answer
1k views

How to Retrieve & Deploy Salesforce Lightning Theme using metadata api?

We created a custom Lightning Theme (Setup > User Interface > Themes and Branding) in the sandbox and have to push it to another org using Metadata API. We were able to retrieve Branding Set from ...
0
votes
1answer
70 views

Add or Edit Custom Metadata Records Declaratively requires CustomizeApplication, any Visualforce workarounds to allow regular user this ability?

I'm currently using visualforce and apex to allow a user to manage their own Hierarchical Custom Settings. By design this allows non-admins the ability to edit their Hierarchical Custom Setting values ...
2
votes
1answer
2k views

Retrieve/Deploy a custom metadata type's list view?

I'm trying to deploy a list view for a custom metadata type using the Force.com Migration Tool, but I am unable to locate the ListView to include in my package.xml retrieve. I have deployed many ...
0
votes
1answer
54 views

How to hide managed package test-only Custom Metadata records once the package is installed?

The advice in Testing Custom Metadata Types is to add metadata records for unit tests if necessary. We need our managed package customers to be able to add additional records, so having the test-only ...
0
votes
0answers
138 views

Translate custom metadata into a math operation

EDIT: I am sorry for the poor description. I tried editing it to make it more clear. I have an API that will accept several parameters. At the moment I need to perform a math operation using those ...
0
votes
1answer
577 views

How to use custom metadata in validation rule? [duplicate]

How to use a custom metadata records checkbox field in validation rule over a custom Object? Is there any way?
0
votes
2answers
2k views

Parse custom metadata in lightning component

I'd like to display 5 different values from a custom metadata type in a lightning component. Instead of doing 5 different Apex methods, I'd like to return them all at once and then display the values ...
0
votes
1answer
388 views

update custom metadata types :getting error

I need to update the value in custom metadata type when ever the class called/invoked. I am getting error like field is not writable even though permission is there,here family id is number data types ...
6
votes
1answer
380 views

Remove Custom Metadata w/ Custom Metadata API

I am attempting to remove some custom metadata, I am able to deploy it, and view a successful result, but when I create a new Metadata.DeployContainer container, and use the container.removeMetadata ...
5
votes
1answer
89 views

Packaging org: Deleted custom metadata records

My company is in the final stages of a project where we developed (using DX but 1st generation packaging) a managed package for the customer. This week is the first time we're actually packaging it up ...
6
votes
2answers
1k views

Custom metadata type not accessible after installation with sfdx

I create an app using sfdx and at one point I convert it as a package using: sfdx force:source:convert --outputdir mdapi_packageName --packagename packageName and installing on a (other) org using ...
1
vote
1answer
724 views

Custom Metadata Manipulation in APEX

I am attempting to do some DML on a Custom Meta Data record, to allow users to have some "Defaults" when a managed package is installed, that we would also like them to be able to manipulate (and save ...
2
votes
1answer
137 views

Custom Metadata Contact FirstName and LastName not available

I am using custom metadata with a field of type Metadata Relationship(Field Definition) to provide the config side of an app, however when selecting Contact as the object I cannot find the FirstName ...
1
vote
1answer
131 views

custom metada type - checkbox field value

I am unable to mark custom metadata type's field of type checkbox to true from apex code. public class PRTestCtrl{ @AuraEnabled public static void saveCMD() { // Set up custom metadata to be ...
0
votes
1answer
310 views

Custom Metadata Types - RecordType

I have created a Custom Metadata Type that has a field with a relationship to EntityDefinition(object). This EntityDefinition here suggests a field RecordTypes, but it is available only in the ...
3
votes
1answer
3k views

Use Custom Metadata as lookup instead of hard coding

I've now read so many articles on Custom Metadata my head is spinning. Can someone give me a simple answer please as to how to use this instead of hardcoding a check for a value? I have a custom ...
-2
votes
1answer
61 views

Read Custom Meta Data in VFP tags without Controller

Just checking if we can read Custom Meta data in VFP just like custom Label without using Controller class. If its not possible then please let me know few examples of reading meta data in VFP using ...
1
vote
0answers
35 views

Remove actionOverrides to managed packages

I want to set a flexipage as an org default by adding an action override to Case.object-meta.xml: <actionOverrides> <actionName>View</actionName> <content>Case_Record_Page&...
2
votes
2answers
664 views

Custom Metadata Record Size

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 ...
0
votes
2answers
213 views

Scope of Validation Rule Formulas with Custom Metadata Types features

I am looking for solution to enable formula reading for Custom Setting List.I know that for Custom Setting Hierarchy we able to read it from formula. The only work around is using trigger/apex to ...
4
votes
1answer
115 views

Remove property from metadata using packaging 2

We're using packaging 2.0 (SFDX) to develop and create our package, but have made a mistake and wound up with <externalSharingModel>ReadWrite</externalSharingModel> in a custom object. ...
2
votes
2answers
79 views

Open up access for managed package subscriber

I am developing my first managed package where the default installation will be free and will provide access to some data. And if a user wants to go Paid, he will have access to additional data. ...
1
vote
0answers
941 views

Can't create list custom settings (have they been deprecated?) [duplicate]

The option to select the "List" type on the new custom settings screen is not available (disabled and set to "Hierarchy.") I see a notification to use Custom Metadata types, however they will not work ...
0
votes
2answers
7k views

How do I insert records in Custom Metadata Type through Apex?

I want to write a trigger on a custom object (Template__c) such that it invokes the creation or update of Custom metadata type records. Since the fields are not writeable, how do I achieve this? I ...
1
vote
1answer
137 views

Store Formula in String Field and Convert to Datetime?

I am working on building a rules processor and have a text (string) field in a custom metadata type that I would like to store a formula in (i.e. datetime.now()) and then convert to the correct field ...
3
votes
1answer
833 views

Unable to migrate Custom Metadata settings using ANT in salesforce

I was looking to Migrate the Custom Metadata settings from Dev to SIT box. For that I created the following package.xml. I have total 5 different custom metada setting <?xml version="1.0" encoding=...
0
votes
2answers
458 views

Error: Header must contain atleast one of these two fields - DeveloperName, Label

Error: Header must contain atleast one of these two fields - DeveloperName, Label. on uploading data through custom metadata loader. even i have Label as the first column, it still throws this error
1
vote
1answer
250 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
94 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
152 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 ...
3
votes
1answer
148 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
678 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 ...
8
votes
1answer
421 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
538 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
38 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
261 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
931 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
134 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 ...