Questions tagged [custom-metadata-types]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
15 views

change hardcoded email to custom metadata type

I'm trying to amend a trigger from hard coded to custom metadata type: please assist, not really sure on how custom metadata types work. system.debug('rTypes'+rTypes); if(rTypes.size()...
0
votes
1answer
24 views

Add custom metadata records to unlocked package [closed]

Like the question says. I'm trying to find a way to add custom metadata records to an unlocked package.
0
votes
1answer
33 views

How to fetch Custom Metadata Type record in apex and compare it with a string

I have a string which is holding email ids of users from my org. Now I have few custom metadata type records which are holding email IDs of users who are inactive. Now I need to compare the string ...
0
votes
1answer
17 views

No create/update access for object when importing records from CSV via Salesforce CLI

I've been testing to insert a custom metadata type record from a CSV file via Salesforce CLI. I've used below command but I've been getting the following error: Command sfdx force:data:bulk:upsert ...
1
vote
1answer
22 views

Packaged Custom Metadata Type Records Not Editable Once Deployed Even Though They Are Public

I have a managed package which has a custom metadata type. My package has default records in that custom metadata type. The custom metadata has been set to have a visibility of Public. Also, those ...
1
vote
1answer
30 views

Comparing Checkbox Field Values of Two Unrelated Objects Using Map in Salesforce Apex Trigger

I am trying to get field values of a Custom Metadata Type and compare to same field values in another custom object. If combination of checkbox values in custom object matches one of the combinations ...
1
vote
1answer
22 views

Is it advisable to store file id in Salesforce Custom Metadata Type?

I have been trying to understand custom metadata types in Salesforce, but there's still a lot of confusion on my end. I understand that hardcoding record ids is not a best practice, and I would like ...
0
votes
0answers
11 views

Can you create/delete custom mdt records from a Flow?

I'm creating a flow to help users administer Custom Metadatatype records. No problem reading in the mdt records into a collection variable, and displaying them in a multi-select picklist. However, i'...
0
votes
1answer
46 views

getting an error System.DmlException: Update failed. First exception on row 0 with id 00N000000FqP2cIAF; first error:

I am getting in MyTestClass System.DmlException: Update failed. First exception on row 0 with id 00N000000FqP2cIAF; first error: INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, insufficient access ...
0
votes
1answer
26 views

salesforce app cannot create custom metadata types on after installing on Environment Hub Orgs

I have a salesforce app and push the code on scratch orgs. Its working fine and Custom Metadata Types are created successfully. I packaged and promoted the app successfully using ISV account. then I ...
2
votes
0answers
53 views

Unlocked Package - Modify Custom Metadata Type in Subscriber Org

I created an Unlocked Package that contains a Custom Metadata Type (CMT). When I install this package inside an org, I would like to give access to admins to edit this deployed CMT (e.g. - create a ...
-2
votes
1answer
51 views

getting an error Comparison arguments must be compatible types: List<User>, List<Case__mdt>

private static void whoCanClosetheCase() { List <Case__mdt> FederationIdinCustomMetaDataType = [SELECT DeveloperName, Federation_ID__c FROM Case__mdt]; List <User> ...
0
votes
0answers
19 views

Make users in custom metadata type to change case status to 1) proceed and 2) decision in apex trigger [duplicate]

I have created Custom metadata that will store the federation Id of the Users who can close cases. I will need to write a trigger to allow these users to change the status of the case 1) proceed and 2)...
1
vote
1answer
26 views

Is Metadata.CustomMetadata and Metadata.Operations available in Essentials and/or Professional edition?

I can't really find much on the subject - is Metadata.Operations and Metadata.CustomMetadata available in Salesforce Professional and/or Essentials? I know that simply selecting metadata like so [...
3
votes
4answers
4k views

Check if User has Permission to update Custom Metadata

I'm building Visualfroce for updating Custom Metadata. When User without required permissions tries to update them he gets I tried checking MetadataType__mdt.getSObjectType().getDescribe()....
1
vote
0answers
150 views

Get Multi select picklist and update corresponding category using custom metadata type

We have a Custom Metadata Type which shows the relation between a product of interest and categories. When a product of interest is selected we would like the corresponding categories to be selected. ...
2
votes
2answers
114 views

Disjunctions not supported on a flow (Bulk?)

Has anyone encountered a "Disjunctions not supported" while automating with a flow getting values from a custom metadata? Do you have any recommendations? From the reading that I did, "Disjunctions ...
1
vote
1answer
107 views

Can DeveloperName Be Updated via Apex Metadata API in a Custom Metadata Type?

I want to update the DeveloperName field via Apex in a Custom MetadataType. I would like to replace "VALUE1" with "VALUE2". Instead, however, it just inserts another line. Is it possible to update ...
1
vote
0answers
61 views

How To Optimize Looping?

I've written a utility class that enables a Custom Metadata Type mapping for Object to Object data cloning. I'd like our Admin team to be able to add/create/adjust the Fields on either object without ...
1
vote
1answer
1k views

Updating Custom Metadata Type's Field value via Apex

I'm trying to update a Custom Metadata Type's Field value via Apex. I'm building an Account Assignment Round Robin tool, the Tool calls on the Custom Meta Data Type to get the Value of the position ...
2
votes
2answers
45 views

Writing tests that require multiple versions of custom data

OK here is a real fun one. I need to write tests that cover code that queries for custom metadata types. The code and test will be deployed to many different salesforce organizations which will ...
0
votes
2answers
176 views

Is it possible to query Custom Metadata type record labels?

I am looking for something like, API sObject name for the Custom metadata types, the way we have for ApexClass and ApexPage. I am trying to generate a list of Custom metadata type labels, CreatedBy, ...
2
votes
1answer
497 views

Custom Metadata Type - Page Layout - Can they be added to a managed package?

I have some Custom Metadata Types in a managed package. I just noticed that CMT's have page layouts. I can not see how I can add the CMT page layout or list view to my managed package. Is this ...
7
votes
3answers
898 views

Do we need to check CRUD permissions on custom metadata type/custom setting to pass the AppExchange security review

I have an application that we need to upload on AppExchnage but we need to pass the security review so I have a query on the custom metadata type so do we need to check the isAccessible() permission ...
0
votes
1answer
25 views

Define CustomMetadata Type with API

I am trying to define a CustomMetadata type via an API. Any (Apex, REST etc) API is ok. So far I have only been able to create new instances of the type but I have not been able to define the type ...
0
votes
1answer
408 views

CREATE CUSTOM METADATA USING APEX

I wrote a little code that creates metadata custom type: public class CreateUpdateMetadataUtils implements Metadata.DeployCallback { public void handleResult(Metadata.DeployResult result, Metadata....
2
votes
0answers
21 views

Should I use List custom settings in my managed package app?

BACKGROUND I am working on a managed package application and I need to store some configuration data. This data is supposed to be edited by admins in the subscriber org. The setting simply stores ...
1
vote
0answers
38 views

Using Protected Component for “Secret Protection” with Unlocked Packages

How do "Protected Components" (Custom Settings or Custom Metadata) function when installed from an Unlocked Package. I was hoping that I would be able to use as "Protected (Managed)" to store "...
1
vote
2answers
1k views

Custom Label, Custom Setting or Custom Metadata Type for a simple URL

In one of my orgs, I have a simple Visualforce page with just an iframe inside. I don't want the URL to be hard-coded. I didn't develop anything else in this org. To store this simple URL, which one ...
4
votes
2answers
249 views

How to load configuration from custom meta data

I'm new to Salesforce, though an experienced Java developer and I'm trying to load my App's configuration using the recommended method of custom meta data. I've found this quite poorly documented ...
2
votes
1answer
777 views

Is it possible to create a report (type) for custom metadata?

Custom metadata (types) looks like a cool feature. I have created dozens of instances of one that I made and now I would like to create a report on them, because a list view is not good enough. So ...
3
votes
2answers
592 views

What is the best practice to store custom configuration for a managed package application?

We are working on an application in managed package, and we need to store app configuration. Generally, we want to allow users to turn on/off some features in our app. For example, on the settings ...
3
votes
1answer
841 views

Custom OAuth Auth Provider

I have a Rest API Endpoint that I am looking to callout to. Something like this: https://myrestservice.com/service/logs When setting up the Named Credential, I set up the URL to: https://...
2
votes
1answer
265 views

Why formula field in not allowed in custom metadata

I had a requirement where I need to show list of buttons in a record edit form page. These values I am taking from custom metadata record. Fields in custom metadata records are Market(Logged in user's ...
0
votes
1answer
186 views

Check if string element is present in custom metadata type list

I have a list of custom metadata type. I need to check if the string element is present in custom metadata type. Currently, I'm hardcoding the browser name in my if condition, but I need to compare ...
5
votes
1answer
429 views

Qualified API Name returns null in Test context for Custom Metadata

Winter 19 release provides ability to instantiate the custom metadata in apex .This seems to be useful to generate data for test classes . However when we have metadata relationship entity or field ...
0
votes
1answer
91 views

Error updating custom metadata types through Talend

I am trying to update a custom metadata type record through the standard Salesforce connectors in Talend. But I receive an error that says "unable to update entity type". Are we able to update these ...
0
votes
1answer
39 views

How to overcome Salesforce System Error when deploying from Apex Code more than 1488 Metadata Records?

Conversion process of custom object records into Custom Metadata records using Metadata.Operations class enqueueDeployment method fails if deployment container contains more than 1488 records. ...
7
votes
1answer
4k views

Eliminate query on Custom metadata type?

I'm trying to use Custom metadata type to replace a List type Custom settings. I have to access the Custom metadata type information in multipe apex classes and triggers. When I use custom settings, ...
0
votes
1answer
15 views

How to update a package in test environment after I changed it in development environment?

How to update a package in test environment after I changed it in development environment? After creating a package I forgot to add a few records of a specific Custom Metadata Type. Now I went to the ...
1
vote
1answer
426 views

Ant Problem deploying field on custom metadata type

I am trying to deploy a field on a custom metadata type using Ant. Here's my package.xml: <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata"> ...
1
vote
1answer
426 views

Do custom metadata types count against the custom object limit?

I couldn't find any information on this doing a search. I know that custom settings count against the custom object limit, but wasn't sure about custom metadata types. This is important as we can ...