Advertisement
Guest User

Untitled

a guest
Feb 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. Presentation__c presentation = new Presentation__c(Name = 'test');
  2. insert presentation;
  3. Integer sequencesCount = 100;
  4. List<Sequence__c> sequences = new List<Sequence__c>();
  5. for (Integer i = 0; i < sequencesCount; ++i) {
  6. sequences.add(new Sequence__c(Name = 'test' + i));
  7. }
  8. insert sequences;
  9. List<SequenceFile__c> sequenceFiles = new List<SequenceFile__c>();
  10. List<PresentationSequence__c> presentationSequences = new List<PresentationSequence__c>();
  11. for (Integer i = 0; i < sequencesCount; ++i) {
  12. sequenceFiles.add(new SequenceFile__c(Name = sequences[i].Name,Sequence__c = sequences[i].Id, Status__c = 'Active'));
  13. presentationSequences.add(new PresentationSequence__c(Presentation__c = presentation.Id, Sequence__c = sequences[i].Id));
  14. }
  15. insert presentationSequences;
  16. insert sequenceFiles;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement