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
-3 votes
0 answers
26 views

Getting Error on system.limitexception: soql currently not allowed error [closed]

Getting Error on system.limitexception: soql currently not allowed error when trying to query Custom metadata even then if public.
user avatar
1 vote
0 answers
11 views

Custom Metadata Type Usage Exceed but Custom Metadata Types is 0

Our org needs to install a package to our salesforce instance but we got an error message stating that our custom metadata type usage has been exceeded. When we look on the backend, custom metadata ...
user avatar
  • 11
0 votes
1 answer
8 views

Is this possible to have additional fields or validation rules in package extension?

I want to move some fields and some piece of functionality which we have developed but don't want to release yet to package extension. But I have some both either with deployment to scratch org or ...
user avatar
  • 13.2k
0 votes
0 answers
14 views

Packaged Custom Metadata values Cannot be Viewed even though set to Public Visibility

I have added a custom metadata type to a managed package setting it's visibility to public and the records on it are not protected however I cannot see the records after I have deployed the package, ...
user avatar
  • 1
0 votes
1 answer
20 views

Metadata cannot be deployed from within a test [duplicate]

When trying to insert a custom metadata record within the test it gives me the following error @IsTest public class Object_1TriggerTest { @IsTest public static void Load_field_1_from_metadata()...
user avatar
1 vote
1 answer
28 views

What are the options of using apex to delete protected custom metadata record from subscriber org?

I know that I can use Metadata API and can use Apex to run Metadata API to delete metadata, like Custom Metadata records. I know that I can leverage Metadata.Operations class to create or update ...
user avatar
  • 13.2k
2 votes
1 answer
35 views

Custom MetaData creation using apex for a nameSpacedOrg

This Is the Error I am getting {"status":500,"body":{"message":"An internal server error has occurred\nError ID: 1020912311-169956 (-524102090)"},"headers&...
user avatar
1 vote
2 answers
74 views

How to use Custom Metadata methods in the function?

I would like to use CustomMetadata_mdt.getall().values() function to retrieve metadata in apex function. Custom Metadata CustomMetadata_mdt should be the function's parameter. How can I achieve this? ...
user avatar
-2 votes
1 answer
53 views

Can we add LookUp relation between custom object and custom metadatatype [closed]

-->Can we add LookUp relation between custom Object and custom Metadata type? --> My second question is, is it possible to create a picklist field with empty values and then we need to add ...
user avatar
  • 1
1 vote
1 answer
31 views

Not getting metadata record field values on lwc page using apex [closed]

//Apex class public with sharing class getMetafieldController { @AuraEnabled(cacheable=true) public static String getMetaList(){ Organisation__mdt APIDetails = Organisation__mdt....
user avatar
  • 11
1 vote
1 answer
73 views

Custom Metadata - default value does not apply to existing records

Problem I'm working with custom meta data records. We have email subscription recipes for various contacts in the org. The admins need to be able to add custom fields to these recipes without ...
user avatar
  • 1,228
0 votes
1 answer
82 views

Error handling for Custom metadata Creation and Updating

I have a requirement to create and update custom meta data using apex , I'm passing the required values from my lwc , though i have found no proper example of handling the error since ...
user avatar
1 vote
1 answer
87 views

Record Edit for custom metadata

Is it possible to use lightning-record-edit-form in LWC for custom metadata types?
user avatar
  • 39
0 votes
1 answer
44 views

Metadata.Operations.enqueueDeployment namespace error

My Apex code that does a Metadata.Operations.enqueueDeployment of some custom metadata records including in a 2GP managed package worked in a scratch org that had the namespace set, but fails when run ...
user avatar
  • 129k
-1 votes
1 answer
58 views

Is hard coding custom metadata type name in Apex a good practice?

I am new to custom metadata types (CMDT). With the Winter'22 maintenance, I learned that there is no longer a need to write Salesforce Object Query Language (SOQL) to access custom metadata records in ...
user avatar
  • 35
-1 votes
1 answer
90 views

How can I access Custom Metadata objects without having to hard code in Apex? [closed]

I hope you all agree that hard coding object names is not scalable or maintainable. I would like to lookup the field based on a string input received from the user. Is there any way to do this using ...
user avatar
  • 35
3 votes
1 answer
231 views

Can I retrieve Custom Metadata Records dynamically in a Lightning Web Component without Apex and without hardcoding ID

I am trying to build a Lightning Web Component that uses Custom Metadata Types. It will be used on record page. I am successfully retrieving the ID of the current record, then I am using its type as a ...
user avatar
0 votes
1 answer
55 views

Where to set Metadata Type Field Security

In Apex code running in a trigger I need to check permission for MetadataType doing something similar to this: Schema.getGlobalDescribe().get('objectName').getDescribe().fields.getMap().get('fieldName'...
user avatar
  • 31
0 votes
1 answer
98 views

Page layout on custom metadata type

I've seen that I can asign page layout to custom metadata by I don't know where it is used. Is there a way to display custom metadata as if it were a standart object with a page layout?
user avatar
  • 160
0 votes
1 answer
58 views

How to use Custom Settings or Custom Metadata to dynamically add fields to code

I have written apex code to copy the data of a few specified fields from Order record to Order Line Item record when their values are modified. The problem here is every time a new field has to be ...
user avatar
1 vote
0 answers
34 views

How to set a text block of more than 3.9k characters based on a condition in a formula field?

I have a requirement where I need to create a number of formula fields that will contain one or more paragraphs of legal verbiage based on certain conditions. But since formula fields only take 3.9k ...
user avatar
0 votes
1 answer
63 views

Any way to avoid the blue screen background showing on a custom LWC lightning__Tab?

I am creating a custom LWC component that presents a list of Custom Metadata records using the same sort of styling that a default list of SObject Records would use. The mechanism works as described ...
user avatar
  • 129k
1 vote
1 answer
2k views

Retrieving custom metadata values in LWC

I have Custom Metadata Type values that I want to display in a Lighning Web Component. I've read a few different posts (post 1, post 2) about this but neither seems to work for my scenario. My Custom ...
user avatar
0 votes
1 answer
93 views

Apex to parse JSONArray stored in "Custom Metadata Type" [duplicate]

I'm trying to parse the JSONArray that has been stored in the Custom Metadata Types. 1.The JSONArray(Stored in Custom Metadata) looks like, [{ "time": "5 AM", "leads&...
user avatar
3 votes
1 answer
49 views

How to find dependants of custom metadata records?

Whereas when you lookup a field in an object there is a button - 'Where is this used' How can you ascertain (easily?) where a custom metadata record is used?
user avatar
1 vote
1 answer
274 views

Bulk Upsert Custom Metadata with Salesforce CLI

I'm going to do a Q&A-style entry here since I had to spend some time figuring this out, and I couldn't find any good articles about it via search. Bulk-upserting Custom Metadata Type records is a ...
user avatar
0 votes
0 answers
57 views

Not able to compare custom metadata value with picklist value in formula field

I am using a formula field where I have a condition If(TEXT(File_Review_Status__c) = $CustomMetadata.Dynamic_Value__mdt.Status4.File_Review_Status__c, true, false) It's giving me the below error. ...
user avatar
0 votes
1 answer
123 views

Can We Use Generic SObject With Custom MetaData Types getAll For Invocable Flow

We have an Invocable Apex Class to do SOQL which uses generic SObject in flow but returns an error the same if trying to use that Sobject for the Custom Metadata getAll method. global with sharing ...
user avatar
  • 1,426
1 vote
1 answer
471 views

Can't find Custom Metadata Records in Change Set Components

I have Custom Metadata Records, the Type being in an unlocked package, which I want to add to an Outbound Change Set. I have all Custom Metadata Types enabled for my Profile (even necessary?), but ...
user avatar
1 vote
1 answer
80 views

Using metadata in formula in Apex

I was working on a bank management App. and as a feature, I created a batch that is supposed to do a deposit regularly every three months. And the requirement was that I use a custom metadata for the ...
user avatar
1 vote
0 answers
71 views

Custom Metadata Type: Editing SubscriberControlled field values in managed package

I have a Custom Metadata Type which is part of a managed package I created. This type is used in order to map certain properties of a Salesforce Lead Object to some other custom properties of my own. ...
user avatar
1 vote
1 answer
73 views

Is it correct that "Subscriber editable" custom metadata type fields avoid the need for an unmanaged package?

Old catchily titled documents such as How to use custom metadata types to save years of development on app configurations say: Subscriber-editable records: Put metadata records you want edited by ...
user avatar
  • 129k
0 votes
0 answers
30 views

How to package Salesforce data (not metadata)

This question is NOT about Custom Metadata Types where records can be indeed be put into Packages. It's about packaging real data. Records of Custom or Standard objects. Just assume you want to have ...
user avatar
0 votes
1 answer
91 views

Custom metadata type in Stub api

I am using trying to stub my class, but I have get and set for custom metadata. I know that I cannot stub get and set. Is there exist any design for using it in stub? Or I must just hardcode it and ...
user avatar
1 vote
1 answer
409 views

SFDX Custom Metadata commands

When I am executing sfdx command to generate custom metadata from custom settings object, I receive error No sObject with name My_Existing_Object__c found in the org. However object/custom setting is ...
user avatar
  • 195
0 votes
0 answers
17 views

When was updated fiel on CMD record

I have a Custom metadata type - RR In this Custom metadata type, I have record - test In this record, I have a field - fff My goal is to know when fff was updated last time (value on this record).
user avatar
0 votes
1 answer
199 views

Can we edit custom metadata types after deploying to production? [closed]

I am new to salesforce development, Suppose I have a custom metadata type custom__mdt, and it has two fields, Custom_Field_one__c and Custom_Field_two__c. Let's say the field values are null while ...
user avatar
  • 25
0 votes
0 answers
140 views

Deploying Custom Metadatatype and apex class using that custom metadata type

I have an apex class which is exposed as a rest API, It sends field value of a custom metadata type in response. My response string is like this - string respString = '{"success":'+true+'...
user avatar
  • 25
-2 votes
1 answer
50 views

Get metadata with out query [closed]

I have LoginAPI__mdt --> record Login --> field URL. How I can get this field without a query? The problem was with the metadata version - we need 51 to work with this feature Thank you!
user avatar
3 votes
1 answer
87 views

How to let extension packages customize UI of base package

Salesforce is bringing out a lot of new things to make Lightning UI more flexible: Dynamic Forms, Dynamic Interactions, etc. But they are not ISV-friendly because they are based on Flexipages. And ...
user avatar
0 votes
1 answer
35 views

Unable to call Custom Metadata picklist field in Process Builder

I am having an issue trying to write a formula in Process builder that will updated a text field with the picklist data from the custom metadata. IF((CONTAINS([Object_Name_c].Field_Name__r.Name, “...
user avatar
3 votes
1 answer
184 views

How to securely deploy secret key in custom metadata - 2GP Managed Package

I have recently created a managed package and I am preparing it for security review and final deployment. In the code I need to sign JWT used to authenticate against external API, for this purpose I ...
user avatar
0 votes
1 answer
36 views

Aura component behaving differently according to profile

Hello I have this aura component, when I log as a system administrator, it shows perfectly translated and displays the expected values (I use custom labels for translation and custom metadata for the ...
user avatar
1 vote
0 answers
49 views

Building json dynamically

Following on from Any Ideas for Building dynamic JSON with apex. Trying to build json literal from an sObject dynamically (according to custom metadata - see here for more detais) I have allowed ...
user avatar
  • 17
1 vote
1 answer
137 views

Invocable Apex in Flows and Custom Metadata SOQL limits?

Say we have a record-triggered flow that calls invocable Apex. The Apex class uses SOQL to query custom metadata and return a value to the flow. Does the Apex custom metadata query count against the ...
user avatar
  • 6,300
0 votes
1 answer
299 views

LWC Custom Metadata Schema Import Failing In Change Set Validation

tl;dr - How can one successfully validate an LWC via a change set that contains schema imports to a custom metadata type? Problem I have a working LWC in a sandbox, and am attempting to port it to ...
user avatar
  • 601
0 votes
0 answers
43 views

Any Ideas for Building dynamic JSON with apex

I need to build a json for external rest service(non salesforce platform) dynamically according to mapping stored in a custom metadata object (named SobjectToJSONFieldsMapping__mdt) records(i.e. ...
user avatar
  • 17
4 votes
1 answer
128 views

The Single Responsibility Principle vs SOQL Query/Row Limits

This question was asked similarly last month in Break single responsibility to save a soql call and was closed for being opinion based. The given use case also involved Queueable and so wouldn't ...
user avatar
0 votes
1 answer
164 views

Creating a Metadata Record with a lookup field

I am working with custom metadata types and I have created a lookup field to another Custom MDT. I need to create the records with Apex, and as of I now I can successfully create the records the only ...
user avatar
0 votes
1 answer
37 views

Need to get count of cases who are in new/working states

I have requirement to get case count with some conditions like created date and status. These both fields needs to be configurable. I have built something like this and its working but reviewer saying ...
user avatar
  • 3

1
2 3 4 5
7