Created
May 13, 2018 09:05
-
-
Save HemantShukla/6c3ae992ea261079e764ef0567693dca to your computer and use it in GitHub Desktop.
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
PushTopic pushTopic = new PushTopic(); | |
//Channel Name | |
pushTopic.Name = 'ProductUpdates'; | |
//Define the query which will be used to create the payload | |
pushTopic.Query = 'SELECT Id, SKU__c, PackageType__c, ShelfLife__c FROM E_Product__c | |
pushTopic.ApiVersion = 42.0; | |
//Get Notification for all the fields | |
pushTopic.NotifyForFields = 'All'; | |
/**** Optional, By Default all are true **/ | |
pushTopic.NotifyForOperationCreate = true; | |
pushTopic.NotifyForOperationUpdate = true; | |
pushTopic.NotifyForOperationUndelete = true; | |
pushTopic.NotifyForOperationDelete = true; | |
insert pushTopic; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment