Skip to content

Instantly share code, notes, and snippets.


Andrew Fawcett afawcett

View GitHub Profile
afawcett / CMTService.cls
Last active Aug 17, 2018 — forked from madmax983/CMTService.cls
Apex Stub API with Static Methods
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);
return cmtWrappers;