I have a custom metadata with 6 fields, I want to create a Map with two of those fields which are DeveloperName and NameAnimal__c, Is that possible to do that without a for loop?? Is there any standard method?


I believe that converting a query directly to a Map is only possible if you are going to use a map of IDs and SObjects. In your case, I think I loop is the solution.

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.