Questions tagged [custom-metadata]
Custom metadata types are like list custom settings, but the records are deployable and packageable metadata.
393
questions
-1
votes
1
answer
42
views
What is the major difference between Custom Setting and Custom Metadata?
I have gone through various articles for the difference between Custom Setting and Custom Metadata but I couldn't find the major difference why we should setting over metadata or metadata over setting....
0
votes
1
answer
36
views
Deploy custom metadata records from one sandbox to another with Apex
I have a situation where I would like to deploy records of custom metadata types from one sandbox to another through Apex. The reason for using Apex is that there will be a lot of records under the ...
-1
votes
0
answers
23
views
Invalid id: Invalid Field defined in MetadataLine number
I'm using Platform event (configured metadata with event on fields) to pull records that got update from one object to another object , just to keep updates on my tracker.
When tested to reproduce, ...
0
votes
0
answers
31
views
Duplicate value on record: on Custom Metadata for deleted record
I have a managed package, beta version, installed in an org. There is a Custom Metadata type with a custom field that is set to Unique Values. I created a record and had a unique value of '15' in that ...
-1
votes
1
answer
62
views
Create a JSON using Custom metadata type [closed]
I have a custom metadata which store some parameters which I need to pass in Post callout.I have stotred the Options in below JSON in that custom metadata
{
"email": "[email protected]&...
0
votes
0
answers
38
views
Translation of Record Name value
I have an Object A with a lookup field to Object B and a Language__c field. I would like to create another field on Object A to display the record name value of the record from Object B in a correct ...
-1
votes
1
answer
54
views
Custome Metadata getAll() vs SOQL query
I have checked in official documentation that we can use getAll() method to query all metadata records. My apprehension is that does it actually run a SOQL in the background and consume the governor ...
4
votes
2
answers
178
views
Packaged CMDT record fails to update even for Sysadmin
Note: There is a related Salesforce Support Case #45059901
Convinced by the answers of some real ISV experts, I refactored my Managed Release Package from ugly Custom Settings to Custom Metadata with ...
0
votes
1
answer
44
views
Is there a way to retrieve metadata (Label) of all Mobile & Lightning Action - Metadata.Operations
right now I'm using Metadata calling from Apex.
Apex code:
public static List<String> getPageLayoutInfo(Id recordId) {
String sObjectType = recordId.getSObjectType().getDescribe()....
1
vote
2
answers
146
views
Store settings and API credentials in packaged CMDT records
My current Managed Package supports a single GPT API and covers that with multiple packaged components:
Protected Custom Setting for secure storage of API credentials (Named Creds don't work)
Custom ...
0
votes
0
answers
36
views
Magento 2 automatic token saving
I would need to reduce the token return calls of Magento 2 from this class.
I would have already thought that I could perform this by going to save and history the token within a custom setting.
and ...
1
vote
2
answers
138
views
Mass insert custom metadata records command 'sf cmdt generate records' throws error The column Name is not found on the custom metadata type
I am following the documentation here :
cmdt command Salesforce CLI
precisely this command :
sf cmdt generate records --csv path/to/my.csv --type-name MyCmdt
I am using a csv file with the first ...
-1
votes
1
answer
71
views
Storing a table with multiple value data in custom metadata types
I have a table with two columns. One column is a role and the other are keywords associated with that role. For example:
Roles
Keywords
Admin
Desk, Forms, Data Entry
HR
People, Communication
What ...
0
votes
1
answer
46
views
get metadata as *.object, not folder structure
How do i retrieve metadata, as .object files? Currently what i do is:
use workbench or Package xml Generator to create a package.xml like this
<?xml version="1.0" encoding="UTF-8&...
0
votes
0
answers
117
views
LWC <> External API integration
I've read a lot of questions/tutorials related to this topic but none explains the process in depth. I want to integrate an LWC component with an external system (under my control) and be able to send ...
0
votes
1
answer
108
views
When using getAll to get the value of a field from custom metadata I am getting null instead when I use query, I am getting the result
CustomMetada__mdt metaDataRecord = CustomMetada__mdt.getAll();
for (SObjectField field: metaDataRecord.getSObjectType().getDescribe().fields.getMap().values()) {
System.debug(field.getDescribe()....
0
votes
0
answers
61
views
Storing tokens for custom token management
I'm working with an API that does not follow typical OAuth standards and requires custom headers for passing the token. Typically I would use Named Credentials, but due to the atypical pattern it is ...
1
vote
4
answers
419
views
Custom Metadata Type Records Mass Insert
Trying to mass upload custom metadata type records using cmdt commands. The following was working but now it stopped. I keep getting this error: 'The column Name is not found on the custom metadata'. ...
1
vote
1
answer
185
views
How to mock, inject or otherwise make Custom Metadata available to apex tests
I have some code which relies on some Custom Metadata records to exist, but I don't want my tests to depend on real records in the org. How can I either inject or mock custom metadata records into ...
0
votes
1
answer
33
views
Use Standard Apex Method UserInfo.getUserEmail() in Custom Metadata
I want to move below collections into Custom Metadata
private static Set<String> validAddresesForGoogle = new Set<String>{
'[email protected]',
'[email protected]',
...
0
votes
0
answers
76
views
CMDT CSV Insert Problems
Am trying to insert new records for a custom metadata file and saw that force:cmdt:record:insert has been deprecated. I tried sf cmdt generate records --csv path/to/my.csv --type-name MyCmdt but VS ...
1
vote
1
answer
86
views
Any way possible to move multiple Set<String> into Custom Setting or Custom Metadata?
As my firm expands, I may have numerous Set that can each hold N different values. I want to move these Set values out of Apex and into Custom Settings or Custom Metadata, but there isn't a field for ...
0
votes
0
answers
35
views
Custom Metadata Update does not run QueuebleHandler in Metadata.DeployCallback when called from extended Auth.AuthProviderPluginClass
I am trying to update a Custom Metadata record using the following code, which works perfectly well when run as an Anonymous user through the development console:
public class SageMetaDeploy ...
0
votes
1
answer
52
views
How to include custom metadata records when building a release artifact with the salesforce CLI
Im trying to generate a release artifact by converting some source files to metadata format so I can deploy it with the following command:
sfdx force:mdapi:deploy...
this is the command I'm using for ...
1
vote
0
answers
178
views
Mass Insert Custom Metadata Type Records
I'm using Salesforce CLI to import 5000 records of a custom metadata but I wasn't able to to import Label and DeveloperName together and I saw that is a limitation, so I tried utilize only Name but in ...
0
votes
0
answers
62
views
Assignment Round Robin using Custom Settings distributing ownership unevenly
We had consultants create a custom round robin process for opportunity ownership. However, it seems that their round robin logic is assigning the 3 reps on one of our teams opportunities 50/25/25 ...
1
vote
1
answer
47
views
Custom metadata types clever trigger possibility
Is there any way to cause a triggering event on custom metadata types?
I know there is this idea, which is not implemented.
I have a use case where I need a country list stored (can create custom MDT)
...
0
votes
1
answer
59
views
CODE BEST PRACTICE - Calling the custom metadata check from every method in Trigger
I had previously asked how to write test class to cover custom metadata in Test class coverage required for Custom metadata that turns a Trigger on and Off and found solution from the answers.
As a ...
-1
votes
1
answer
149
views
MetadataService API custom field label update
Recently I am building a side project myself to allow user mass update custom fields label. Currently, you can only do that one at a time. The POC looks good, I am able to achieve that with text and ...
0
votes
2
answers
201
views
Test class coverage required for Custom metadata that turns a Trigger on and Off
can some one tell me how to cover custom metadata in test class? in particular if (Trigger_Disabler__mdt.getInstance('Account_Disabler')?.Disable_Trigger__c == true) line in the code below.
Context ...
2
votes
2
answers
773
views
GetInstance not returning whole value in Long Text field from Custom Metadata
I am querying a long text area field from custom metadata using GetInstance and it is not fetching complete value.
Can somebody please tell me what is the reason?
0
votes
1
answer
161
views
How to use AuthProviderPluginClass in managed package?
I am trying to create custom Auth. Provider for my managed package. Class extending Auth.AuthProviderPluginClass works well in namespaced scratch org, but when packaged and installed in sandbox I am ...
0
votes
0
answers
57
views
Metadata Types access from package
I'm facing with following error:
Developer script exception from Org_Name : 'prefix.AnyClassName' :
Access to entity 'prefix__Some_Metadata__mdt' denied:
Entity is not api accessible
I have a ...
1
vote
2
answers
111
views
Automate or simplify post-install steps for Packaged Flows
I am planning to add a few Flows to my Managed Packages. E.g.:
Record Triggered Flow Templates that detects certain conditions
Screen Flows that define UI for Slack notifications sent out from 1.)
...
0
votes
1
answer
59
views
Salesforce Custom metadata edit access
Is there any way to provide edit access to records of custom metadata, but without Customize Application permission. Customize application gives really wide access and we want to avoid it, but till ...
0
votes
4
answers
750
views
Error updating metadata via Apex
I have an issue, I created a CMT to store a token for a integration with thirdparty system, with the SA user works fine, but it doesn't work for other users, when I check the debug logs I saw this ...
0
votes
0
answers
51
views
Metadata Service API not able to update picklist depedency
We have 3 picklist dependent upon each other:
Category (Mandatory)
Type (Mandatory)
Subtype (Not mandatory)
For each picklist, we have lot of picklist values which consumes lot of time mapping via ...
2
votes
0
answers
381
views
How to make HML Email Template have dynamic Base URL
We have an HML email template using the {{{}}} syntax to provide a link to a record. Unfortunately, this syntax hard codes the base URL within the Email Template XML. For example:
<a href="...
-4
votes
1
answer
144
views
How to setup query on query locator [closed]
I'm trying to setup a batch and i'm using query locator to query the records and i'm custom meta to store my query i'm facing the issues while running the job.
I'm getting this exception:
System....
0
votes
2
answers
333
views
Custom metadata having field of type picklist and want to fetch that picklist field value of that custom metadata into LWC
Please give me an idea on how to get the custom metadata field picklist values into lwc without using apex
0
votes
0
answers
129
views
Hide Lwc Tab based on Metadata
I have a lwc component(called "Tab1") made as a lightning tab and have a custom metadata(called "Enable Tab1") in a different lightning page as a toggle. Then ,need to hide and ...
0
votes
0
answers
104
views
How to append a field value in quick links url?
I have a requirement where I need to append custom country field value(coming from user object) to the quick links URL. This quick link is a custom metadata type. When a user clicks on the link, based ...
2
votes
0
answers
288
views
Custom Metadata Type - Custom Field - Picklist Values Not editable after packaging
I'm currently trying to figure out why we're unable to edit Custom Metadata Custom Field Picklist Values after packaging in another org. From my understanding, I should be able to edit these existing ...
1
vote
2
answers
3k
views
How can I get picklist values from Custom Metadata Type?
I'm building LWC component and I have custom metadata type that has picklist field with 70 values.
I need to display them as options in dual-list-box in LWC.
Is there any imports that I can use to ...
0
votes
0
answers
1k
views
Bulk insert data in Custom Metadata Type using SFDX cli
I have created a Custom Metadata type in my developer Sandbox.
I want to insert data from csv file using cli in vs code. It is giving me error.
sfdx force:cmdt:record:insert --filepath .\Aperia.csv --...
1
vote
1
answer
5k
views
How to retrieve Custom Metadata Type records in VS Code Using Package.xml
I have created a My_Custom_Metadata__mdt(Custom Object) in a Salesforce org, also I have created a few records under this custom metadata. Now I want to retrieve these records in VS Code so that I can ...
0
votes
1
answer
1k
views
Code Coverage to test Custom metadata in Trigger Class
i have a Trigger class with metadata and i want to make a test class, but i don't know how i do with custom metadata.
The custom metadata is a list that automatically adds member status to each ...
1
vote
0
answers
447
views
How to get child records from parent in custom metadata type
I have 4 custom meta datatypes
Dynamic Datatable
Dynamic Datatable Columns
Dynamic Datatable Cell Attributes
Dynamic Datatable Type Attributes
The structure of this looks like this:
Here Data Table ...
0
votes
1
answer
205
views
Are "Modify Metadata Through Metadata API Functions" and "Customize Application" permissions packageable?
I created a beta package with the "Admin" permission set. In the packaging org the Permission Set has permissions Modify Metadata Through Metadata API Functions and Customize Application.
...
0
votes
1
answer
290
views
How to monitor custom metadata usage
We have started to get "The custom metadata organization limit was reached" errors when deploying changes that include new custom metadata records.
I understand what the limit is, and how it'...