View CMTService.cls
public with sharing class CMTService { | |
public List<CMTWrapper> getCMTs() { | |
List<CMTWrapper> cmtWrappers = new List<CMTWrapper>(); | |
List<CMT__mdt> cmts = [SELECT Example_Field_1__c, Example_Field_2_c FROM CMT__mdt]; | |
for(CMT__mdt c : cmts) { | |
CMTWrapper cmtWrapper = new CMTWrapper(c.Example_Field_1__c, c.Example_Field_2__c); | |
cmtWrappers.add(cmtWrapper); | |
} | |
return cmtWrappers; |