You need to sign in to do that
Don't have an account?
Viplav
How to compare values present in custom metadata to List of type string ?
Hi Everyone,
I have created a custom metadata and have kept three values in it. Consider those values as-
'God'
'Is'
'Great'
Now, I have a list of type string which can either have these three values or altogether different values. I want to compare the custom metadata values agaist this list but I am not able to do that using Apex code.
Is there a way I can compare String to a custom metadata list.
List <custom_metadataname__mdt> SNamefromCsetting = [Select sname__c from custom_metadataname__mdt];
System.Debug('SNamefromCsetting :' +SNamefromCsetting );
String[] st = Name.split(' , ');
I have created a custom metadata and have kept three values in it. Consider those values as-
'God'
'Is'
'Great'
Now, I have a list of type string which can either have these three values or altogether different values. I want to compare the custom metadata values agaist this list but I am not able to do that using Apex code.
Is there a way I can compare String to a custom metadata list.
List <custom_metadataname__mdt> SNamefromCsetting = [Select sname__c from custom_metadataname__mdt];
System.Debug('SNamefromCsetting :' +SNamefromCsetting );
String[] st = Name.split(' , ');
Please check the sample code below :
Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.
Thanks
Varaprasad
@For Support: varaprasad4sfdc@gmail.com
Blog : http://salesforceprasad.blogspot.com/
All Answers
Please check the sample code below :
Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.
Thanks
Varaprasad
@For Support: varaprasad4sfdc@gmail.com
Blog : http://salesforceprasad.blogspot.com/
The solution worked perfectly for me. :) Thanks a ton for giving such quick response
Thanks,
Viplav