Advertisement
Guest User

Untitled

a guest
Dec 18th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.55 KB | None | 0 0
  1. // Trigger for listening to Cloud_Fountain__e events.
  2. trigger CloudFountainNewsTrigger on Cloud_Fountain__e (after insert) {
  3.     // List to hold all cases to be created.
  4.     List<Case> cases = new List<Case>();
  5.  
  6.     // Iterate through each notification.
  7.     for (Cloud_Fountain__e event : Trigger.New) {
  8.         if (event.Urgent__c == true) {
  9.             // Create Case to dispatch to our team.
  10.             Case cs = new Case();
  11.             cs.Priority = 'High';
  12.             cs.Subject = 'News team dispatch to ' + event.Location__c;
  13.             cs.OwnerId = queue.Id;
  14.             cases.add(cs);
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement