Skip to content

Instantly share code, notes, and snippets.

@SahSantoshh
Created May 23, 2020 10:23
Show Gist options
  • Save SahSantoshh/db76b817ce869421650437193c6bd50e to your computer and use it in GitHub Desktop.
Save SahSantoshh/db76b817ce869421650437193c6bd50e to your computer and use it in GitHub Desktop.
create_account_push_topic
def create_account_push_topic
account_topic = @client.create!('PushTopic',
ApiVersion: '48.0',
Name: ENV['ACCOUNT_PUSH_TOPIC_NAME'],
Description: 'all account records',
NotifyForOperations: 'All',
NotifyForFields: 'All',
Query: 'select Id, Name, Phone, Type, BillingStreet,BillingCity, BillingState, BillingPostalCode, BillingCountry, Ownerid, ParentId, IsDeleted from Account')
Logger.new(LOG_PATH).info('Account Push Topic Id: ' + account_topic)
nd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment