My SF account (PE with API) doesn't return the "sobject" fields in streaming API notification that it should.

I'v tested with a free developer account, and it works fine there.

I create a push topic like this:

PushTopic pushTopic = new PushTopic();
pushTopic.ApiVersion = 29.0;
pushTopic.Name = 'LeadStream_2901141156';
pushTopic.Description = 'Important lead information';
pushtopic.Query = 'SELECT Company,Country,CreatedDate,Email,Id,Industry,LeadSource,MobilePhone,Name,Phone,Status FROM Lead';
pushTopic.NotifyForOperationCreate = true;
pushTopic.NotifyForOperationUpdate = true;
pushTopic.NotifyForOperationUndelete = true;
pushTopic.NotifyForOperationDelete = true;
pushTopic.NotifyForFields = 'Referenced';
insert pushTopic;

And this is the notification:

Message received from: /topic/LeadStream_2901141156

  "channel": "/topic/LeadStream_2901141156", 
  "clientId": "1xz9m8wc1eyerr3110gjbgklnguk7", 
  "data": {
    "event": {
      "type": "updated", 
      "createdDate": "2014-01-29T01:59:52.000+0000"
    "sobject": {
      "Name": "Ned Flanderz", 
      "Status": "Open", 
      "CreatedDate": "2013-12-11T04:08:54.000+0000", 
      "Id": "00Q9000000Ma8a7EAB", 
      "Company": "Leftorium"

As you can see, there's a lot of fields missing from "sobject"....

The SF doc says: "The fields that you specify in the PushTopic query SELECT clause are contained in the notification message".... But my experience so far is that you can't control which fields get returned.

  • And you've checked field level security on the PE account? The user should normally be able to see them? – joshbirk Mar 5 '14 at 18:45
  • I don't seem to have any options with regards to field level security, which maybe is in line with using PE. The user account for streaming is admin. All fields can be seen/edited by all users. – Scott Mar 6 '14 at 6:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.