You need to sign in to do that
Don't have an account?

Like Clause in SOQL for Custom Meta Data
Hi,
I am running below query on my custom meta data with like clause but it is not giving the correct results.
string prodCode='%TW%';
for(RCF_Application_File_Status__mdt objFileStatus : [Select MasterLabel,DeveloperName,Final_Status__c,RCF_Product_Code__c From RCF_Application_File_Status__mdt where RCF_Product_Code__c like :prodCode OR RCF_Product_Code__c = 'ALL']){
system.debug(objFileStatus.MasterLabel+'_____'+ objFileStatus.Final_Status__c+'---------------------'+objFileStatus.RCF_Product_Code__c);
}
Using the above query i am only rows containing "All" not the result containing "TW,ML".
Is there any limitations on Custom Meta Data for "Like" Clause.
I am running below query on my custom meta data with like clause but it is not giving the correct results.
string prodCode='%TW%';
for(RCF_Application_File_Status__mdt objFileStatus : [Select MasterLabel,DeveloperName,Final_Status__c,RCF_Product_Code__c From RCF_Application_File_Status__mdt where RCF_Product_Code__c like :prodCode OR RCF_Product_Code__c = 'ALL']){
system.debug(objFileStatus.MasterLabel+'_____'+ objFileStatus.Final_Status__c+'---------------------'+objFileStatus.RCF_Product_Code__c);
}
Using the above query i am only rows containing "All" not the result containing "TW,ML".
Is there any limitations on Custom Meta Data for "Like" Clause.
I trust you are doing very well.
SOQL Queries on Custom Metadata is case sensitive. Salesforce has logged this as a known issue and it is under review and they are working on a fix. You can refer to below link to check.
https://success.salesforce.com/issues_view?id=a1p3A0000001CvkQAE
I hope it helps you.
Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in future.
Thanks and Regards,
Khan Anas
We have data presnet in the database and it is exactly matching so no case sentivity issue here, we are not able to fecthc this record using "Like" clause.