Created
March 24, 2015 14:04
-
-
Save pfeilbr/6a6e9593b71f23d664a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NonMatchedAccountExporter { | |
public void run(List_MRK__c listID) { | |
Boolean moreToProcess = execute(listID); | |
while(moreToProcess = true) { | |
moreToProcess = execute(listID); | |
} | |
} | |
public Boolean execute(List_MRK__c listID) { | |
// SOQL to return non-matchs List Attachment Item records up 2000 | |
// [select Item_ID_MRK__c from List_Attachment_Item where limit 2000] | |
String idsString = ''; | |
for (List_Attachment_Item lai : [select Item_ID_MRK__c from List_Attachment_Item where limit 2000]) { | |
idsString = idsString + lai.Item_ID_MRK__c + '\n'; | |
} | |
// Assume these methods will already exist | |
//AttachmentServices.createAttachment(listID, idsString) | |
//AttachmentServices.appendToAttachment(listID, idsString) | |
return records.size() == 2000; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment