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
23 views

Can we edit custom metadata types after deploying to production?

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 ...
0
votes
0answers
29 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+'...
-2
votes
1answer
37 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!
3
votes
1answer
65 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 ...
0
votes
1answer
18 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, “...
3
votes
1answer
52 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 ...
0
votes
1answer
23 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 ...
1
vote
0answers
34 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 ...
0
votes
1answer
30 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 ...
0
votes
1answer
50 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 ...
0
votes
0answers
27 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. ...
4
votes
1answer
71 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 ...
0
votes
1answer
28 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 ...
0
votes
1answer
14 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 ...
0
votes
1answer
39 views

Can we use custom metadata type in a object link formula?

When i try to create a formual field on an object to diplay my custom metadata type, everything is working with this syntax : $CustomMetadata.CustomMetadataObject__mdt.Record.Value__c But when i try ...
1
vote
1answer
94 views

Why user can access Custom Metadata Types without profile permission?

I have got a query about Custom Metadata Types. I've created a Custom Metadata Type 'X' and using it inside a package(Doing a query from 'X'). But, I didn't give the 'Enabled Custom Metadata Type ...
0
votes
0answers
17 views

Setup Audit Trail: Custom metadata record updates are not tracked for one packaged mdt, but works for another one

We have two custom metadata objects inside our managed package installed into client's org. Both mdts are pretty similar - public with fields of different types (text, boolean, long text area), have ...
0
votes
0answers
48 views

how to use Custom Metadata for field mapping

I am working on oen of the project where I need to use custom metadata for field mapping, I have two objects Structure__c Agent__c here structure is the parent and agent is the child object, ...
0
votes
2answers
34 views

Custom Metadata w Record Ids & Unlocked Packges -> Don't Overwrite Values

We have an unlocked package with some custom metadata records. These custom metadata records contain record ids for data in the org, which are configured by our admins after package installation. The ...
0
votes
0answers
37 views

store list of up to 10000 records for lookup from apex code

for an automated pricing method in apex I would need to access a list with 10000 zip codes, with each zip code having a specific value assigned. What is the best approach to store and access? Do you ...
0
votes
0answers
17 views

How many records are reasonable to manage on one Custom Meta data?

I want to know that how many records are reasonable to manage on one Custom MetaData? We have a plan to manage near 30000 records on one Custom Metadata. Each record is not large, but I believe it's ...
0
votes
1answer
44 views

How do I fix the error when adding Custom Settings?

My task is to create an LWC component and then add it to a managed package. I was told that to store the API and the key to it, you should use Custom Settings and Custom Metadata Types. No more ...
0
votes
1answer
46 views

Value is exists in custom metadata list [closed]

I have a list of Custom metadata (Part_one_metadata__mdt) which contains a list of lables (Sunday, Monday, Saturday). Then I am creating a string (public String Medicine) and passing a value. Now I ...
0
votes
1answer
73 views

Invalid field permission field name Account field Account.billingstatecode

I am trying to add permissions to Account fields using Metadata Api. I am receiving the error " Invalid field permission field name Account field Account.billingstatecode" and the permission ...
2
votes
1answer
801 views

Custom Metadata types not supported in Apex Classes?

I'm using a Custom Metadata type to hold the counter for a round robin. The following code provokes an error: Account_Managers_List__mdt AMList = Account_Managers_List__mdt.getInstance('...
1
vote
0answers
40 views

Cannot select person account fields in Custom Metadata Field or Particle relationships

Given a Custom Metadata Type with an Entity Definition Metadata Relationship field ("Account Object" in screenshot), and a Field Definition Metadata Relationship field ("Person Account ...
0
votes
1answer
32 views

Creation of Custom Metadata in a Managed Package

This is an expansion to this question by Robert. Originally he did not put "Managed Package" in the title so I feel like most of the answers missed that part. I am building a managed package ...
1
vote
1answer
22 views

Is there a way to get the ids of the inserted records when using Metadata.Operations.enqueueDeployment

I was going through the documentation and I saw this example public void updateAndDeployMetadata() { // Setup custom metadata to be created in the subscriber org. Metadata.CustomMetadata ...
0
votes
1answer
91 views

Dynamic SOQL Query -> Select Sum(Custom Metadata Field) Question

This is my first intro with custom metadata and also dynamic soql. I am trying to set it up so that users can set up certain fields that they would like to use for the apex class calculation via ...
0
votes
0answers
64 views

Reference Fields in Custom Metadata records in Visualforce page

I'm making a visualforce page that basically has 4 big buttons that each link to a different dashboard. Each button has a name, some description, and a link. I thought I would try to store this info ...
0
votes
0answers
183 views

Apex to return custom metadata and dynamic object data

I am looking to have a lightning web component that returns data from an object based on the record I am on that i can display on a lightning record page . I am exploring programmatically pulling a ...
1
vote
1answer
50 views

Forceignore CustomMetadata on pull

The documentation says: Sometimes, you make a change directly in a scratch org but you don’t want to pull that change into your local DX project. To exclude remote metadata changes, use the format &...
2
votes
1answer
79 views

Managed package - delete custom metadata using apex

We are building a managed package which having an integration with external system. We are getting the external system credentials from the Subscriber org admin and storing it in a protected custom ...
1
vote
0answers
28 views

Converting custom metadata type to custom object [closed]

There is a requirement to convert custom metadata type to custom object because of size constraints of metadata. There are certain records already in custom metadata type. Need to migrate the entire ...
0
votes
1answer
98 views

Dynamic Questionnaire in SFDC

I am looking for a solution to dynamic questionnaire solution where the next question depends on the response of the previous and i need to store the response as well for each question and based on ...
0
votes
1answer
32 views

Need help with using Apex to determine thresholds for a field

We have a field on the account, Market_Segment__c, that is controlled by the following piece of code: public static string getMarketSegment(integer employeeCount){ if(employeeCount < 201) ...
0
votes
0answers
19 views

External URLs with Friendly Name(Translatable) which user can provide on Org and it is visible on community portal

I have a requirement from user in which they want to show a list of URLs(friendly name which are translatable) at country level, on Home page of community. So there are several country, and some place ...
-3
votes
1answer
44 views

What is the best way to fetch values from Custom Metadata? [closed]

Select MasterLabel, Inactive_Email__c from InactiveUsers__mdt
2
votes
1answer
251 views

Do Custom Metadata Queries Count Against Query or Query Row Limits?

According to the Release Notes for Custom Metadata Types: Use SOQL queries to retrieve data from custom metadata types and their records. Unlike other Apex transactions, you can make unlimited SOQL ...
0
votes
2answers
59 views

How to fetch custom metadata in after update trigger that was already retrieved in a LWC?

We have a LWC,mycomponent that will fetch custom metadata records, myCustomMetadataList and store them into a List variable within mycomponent. When a user clicks on the Save button on this component, ...
0
votes
0answers
192 views

Create Dependent Picklists in Custom Metadata declaratively

In our project we've got a Custom Metadata with 2 Picklist Fields: Field 1 Field 2 Field 1 is a Controlling field for Field 2 Two questions: How to create two dependent picklists like we've got in ...
1
vote
1answer
235 views

Is it possible to evaluate a Salesforce formula in Apex?

I want to do something dynamic with an Apex method. I have some custom metadata records that contain an object and field definition. I want to inject the field value from the object into a custom ...
2
votes
1answer
57 views

Custom metadata with Entity Definition field in Scratch Org fails to display custom object name

we have that Custom Metadata which contains a "Entity Definition" field, which is basically a lookup to an object (either standard or custom). We pulled our source from a sandbox to a Github ...
-1
votes
3answers
123 views

batch apex opportunity records are not updating with compare of metadata records

Opportunity records fields compareing with custom metadata record and based on values match opportunity stagename will update but it is not working and gettin error in apex job also that duplicate id ...
0
votes
0answers
36 views

Dynamically reference MetaData Type field in Apex

I'm attempting to create re-usable code passing in the API name of a field. I want to reference that field Dynamically in code, but I'm unsure how to. Additional Context: This Code will be used to ...
0
votes
1answer
268 views

Custom Metadata Error: Developer name already exists for given entity or has been previously used. Please choose a different name

We are trying to update custom metadata records via deployment from source org (Dev Sandbox) to target (i.e. Packaging environment - Dev Edition), these records were packaged into a managed release in ...
0
votes
0answers
406 views

How to map fields using custom metadata?

I have a requirement where i have two objects say, Product and Product line item(Both are custom objects). I have got a requirement where i need to map the fields in the product record to the product ...
1
vote
1answer
130 views

Metadata.Operations.enqueueDeployment Callback not allowing Callouts

I have a scenario where I am saving custom metadata for an external API configuration. I want to deploy all the metadata, then after the deploy job is done, make a callout to the API to verify the ...
0
votes
1answer
36 views

Custom metadata loader Mapping

I am using custom metadata loader to perform the insertion of custom metadata with 200 records. Although I have mapped the values correctly I am hitting the below mapping error. Note: There is no ...
2
votes
1answer
53 views

How to properly test Custom Metadata in Apex?

I'm having some trouble trying to test this methods: public class SendingSAPServices { public static final String SERVICE_SYNC_CLIENTE = 'SYNC_CLIENTE'; public static final String ...

1
2 3 4 5
7