Created
April 25, 2019 17:42
-
-
Save ayub-ansari/631454951cd8fe46c7bc14d2a9b8d7c9 to your computer and use it in GitHub Desktop.
Custom Push Notification In Lightning Service Cosnole
This file contains 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
public class CaseChangesPushNotification | |
{ | |
public static void sendAgentMessage(String message) | |
{ | |
Case_Event__e event = new Case_Event__e(Message__c=message); | |
Database.SaveResult result = EventBus.publish(event); | |
if (!result.isSuccess()) | |
{ | |
for (Database.Error error : result.getErrors()) | |
{ | |
System.debug('Error returned: ' + | |
error.getStatusCode() +' - '+ | |
error.getMessage()); | |
} | |
} | |
} | |
} | |
//CaseChangesPushNotification.sendAgentMessage('5000j000003CpsTAAS'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment