+ Start a Discussion
Mark VermaatMark Vermaat 

pushTopic line break error

Hey Everyone,

I am playing with Streaming API and pushTopics.  I am trying to get it working for the Case object and I keep recieving the "Execute Anonymous Error - line breaks not allowed in string literals."  However, I do not see where the issue is:

Here is the pushTopic code:

PushTopic pushTopic = new PushTopic();
pushTopic.ApiVersion = 30.0;
pushTopic.Name = 'CaseNotifications’;
pushTopic.Description = 'Case Notifications’;
pushTopic.NotifyForFields = 'Referenced’;
pushTopic.NotifyForOperations = 'All’;
pushTopic.Query = 'Select id, caseNumber, accountId, contactId, status, priority, Reason FROM Case';
insert pushTopic;
system.debug('Created new PushTopic: ' + pushTopic.Id);

Anyone able to help me out with finding where the problem is?

Thanks in advance...

Mark
Best Answer chosen by Mark Vermaat
Mark VermaatMark Vermaat
Never mind, I figured it out, I was using the wrong ' all works now.