function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Kiyana DunlockKiyana Dunlock 

Looking to see if there is a way for me to call custom metadata labels dynamically in a formula field?

I have custom metadata where the labels are the names of the Account.
I want a formula field on the Account object that returns the prelog agency feld value associated with the custom metadata with the Account name label
Ex:
 $CustomMetadata.Agency_Match_Error_Accounts__mdt.Case_Legal_Media.Prelog_Agency__c 

Case_Legal_Media is the name of an account and the name of the custom metadata label. I want to insert this dynamically such as !{Account.Name} but unsure of syntax.
VinayVinay (Salesforce Developers) 
Hi Kiyana,

As per my understanding you cannot call metadata lables dynamically in formula.  

Kindly review similar reference below
https://salesforce.stackexchange.com/questions/318150/dynamically-access-custom-metadata-record-from-formula-field

Please mark as Best Answer if above information was helpful.

Thanks,