• Purva K 4
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies

I am using Streaming API and due to the character limit of SOQL, I am unable to write one SOQL for one object (as this object has numerous fields) .

Can I write two SOQL for same object and configure to same pushTopic?

If yes, please can you give an example.

Thank you!!!

Hello, 

I'm currently following the salesforce trailhead, and one of the items it says for me to do is create a PushTopic 
https://developer.salesforce.com/docs/atlas.en-us.api_streaming.meta/api_streaming/code_sample_java_create_pushtopic.htm

I put in the code it lists into the developer console,
PushTopic pushTopic = new PushTopic();
pushTopic.Name = 'InvoiceStatementUpdates';
pushTopic.Query = 'SELECT Id, Name, Status__c, Description__c FROM Invoice_Statement__c';
pushTopic.ApiVersion = 48.0;
pushTopic.NotifyForOperationCreate = true;
pushTopic.NotifyForOperationUpdate = true;
pushTopic.NotifyForOperationUndelete = true;
pushTopic.NotifyForOperationDelete = true;
pushTopic.NotifyForFields = 'Referenced';
insert pushTopic;

but I get Line: 10, Column: 1
System.DmlException: Insert failed. First exception on row 0; first error: INVALID_FIELD, Invalid ApiVersion: [ApiVersion]

Any advise?