Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Trigger for listening to Cloud_Fountain__e events.
- trigger CloudFountainNewsTrigger on Cloud_Fountain__e (after insert) {
- // List to hold all cases to be created.
- List<Case> cases = new List<Case>();
- // Iterate through each notification.
- for (Cloud_Fountain__e event : Trigger.New) {
- if (event.Urgent__c == true) {
- // Create Case to dispatch to our team.
- Case cs = new Case();
- cs.Priority = 'High';
- cs.Subject = 'News team dispatch to ' + event.Location__c;
- cs.OwnerId = queue.Id;
- cases.add(cs);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement