You need to sign in to do that
Don't have an account?
Gabe Levy
pushtopic
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?
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?
Sorry for posting question here but I need help!!!
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.